Skip to content

Conversation

andydunstall
Copy link
Contributor

Fix for #1327.

To avoid the client write failing on a protocol error, meaning they never read the protocol error response, this closes only the servers send side of the connection (to send a FIN to the client but not an RST if the client keeps writing) then drains the client socket. So on the client write will still succeed, then they will receive the error protocol response.

So in #1327, the client now receives panic: Protocol error: invalid multibulk length rather than panic: write tcp 127.0.0.1:42780->127.0.0.1:6379: write: connection reset by peer.

@andydunstall andydunstall mentioned this pull request Jun 17, 2023
@andydunstall andydunstall marked this pull request as ready for review June 17, 2023 16:03
romange
romange previously approved these changes Jun 18, 2023
@romange
Copy link
Collaborator

romange commented Jun 18, 2023

@andydunstall please rebase

@romange romange merged commit 7ec5bd9 into dragonflydb:main Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants