Disconnect a socket If Foundry meets EOF while reading the socket#309
Disconnect a socket If Foundry meets EOF while reading the socket#309sgkim126 merged 2 commits intoCodeChain-io:masterfrom
Conversation
There was a problem hiding this comment.
-
I think it's fine.
-
We should not close the connection if the error is
WouldBlockorInterrupted.
I'm not sure whetherWriteZerowill occur in the non-blocking socket.
In my opinion,InvalidInput,InvalidOutputorTimeOutwill not occur in our code.
We'd better handleConnectionResetandBrokenPipe, but I'm not sure there is a hup event or not in these cases.
I think other errors will not occur while sending/receiving data. -
It's good if we can detect an error, but I suspect that the underlying implementation returns WouldBlock because we use a non-blocking socket. If it does, we cannot detect whether the connection has closed or there is just congestion.
|
@sgkim126 Thanks I'll develop this PR. I found these sentences from the Write document.
https://doc.rust-lang.org/std/io/trait.Write.html When I tested the situation, the write call emits "Broken Pipe" error. I'll check it more. |
|
I found this article from ibm.com
|
|
@MSNTCS This RP fixes the mio issue. |
|
@sgkim126 I'm ready for your review. |
This PR fixes #308
There are a few things to do more.
readcall).