io error/disconnect fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | io: Do not call disconnect handler in destroyerell/ | +9 | 2 replies | |
| 2/2 | io: Allow socket error to be retrieved on disconnectell/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] io error/disconnect fixes
This patchset addresses cases when an error condition is detected in io_callback() and, as a result, io is closed (disconnected), socket is closed and disconnect hanler (if set) is called.
The current implementation closes the socket first and only then informs the client that a disconnect has occured. At this point socket error condition, e.g., ECONNREFUSED, is lost and this potentially prevents the client to take different course of action that may have depended on the error.
Also, a disconnect callback is removed from the l_io_destroy(). The reasoning here is that since l_io_destroy is an API function and is invoked by a client, there is no reason to inform that same clinet that the IO has been disconnected. This allows avoiding some circuitous logic in ell/io.c
Inga Stotland (2):
io: Do not call disconnect handler in destroyer
io: Allow socket error to be retrieved on disconnect
ell/io.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)
Signature · 1 line
2.26.2