Skip to content

Get response status from ChannelFuture #13703

Answered by chrisvest
smiera asked this question in Q&A
Discussion options

You must be logged in to vote

When you terminate curl like that, the client does not do a TCP termination handshake, so the server does not know that the peer has closed its connection. Thus, the connection state on the server is open and we successfully deliver our data to the kernel to be sent. A little while later, the data packets starts arriving at the client, but the client-side kernel has no open connection by that port number, so it responds with a TCP RST packet. When that packet is delivered on the server, it gets turned into a SocketException: Connection reset. Since we 1) have already completed our writes, and 2) have no idea which specific packet caused the TCP RST, we cannot possibly pick a future to fail.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by smiera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants