View Ticket
Not logged in
Ticket UUID: bc0d0f5642eaf9b2184ebed79ea218301770a2e7
Title: Communication failure does not lead to exit(EXIT_FAILURE)
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Open
Last Modified: 2011-08-17 02:20:43
Version Found In: df9da91ba8
Description & Comments:
Reported on the mailing list together with an example of why that's bad...

martin.weber added on 2011-08-17 02:20:43 UTC:
ISTM (by looking at src/http_transport.c) that errors from the communication on either level (http; socket) will not get propagated to the state (struct state in the given file); and as the functions that are doing the (http transport) work do not return a status indicator whether or not operations worked (returning void instead of int, ssize_t or the like) the caller won't know.

For error handling, there is access to the error code / message on the socket layer, but aside from "not having a socket open" no error state gets propagated to the http/transport code layer AFAICS.

client_sync() still returns the amount of errors that have accumulated during attempting the sync (with not having a socket connection being one of the potential errors), but the return value from it is being ignored in callers pull/push/sync_cmd. So the path to fixing this problem would be to start paying attention what client_sync() actually is returning...