Skip to content

io error/disconnect fixes

Inga Stotland ell 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io: Do not call disconnect handler in destroyerell/io.c+9 -232 replies
2/2io: Allow socket error to be retrieved on disconnectell/io.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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