mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2024-12-29 11:40:16 +01:00
remote: Handle client premature disconnections.
* src/cuirass/remote.scm (receive-logs): Catch premature client disconnections and report them.
This commit is contained in:
parent
b9c36654cc
commit
4b7bc873b3
1 changed files with 10 additions and 3 deletions
|
@ -298,9 +298,16 @@ PRIVATE-KEY to sign narinfos."
|
|||
(((_) () ())
|
||||
(match (accept sock)
|
||||
((client . address)
|
||||
(write '(log-server (version 0)) client)
|
||||
(force-output client)
|
||||
(proc client))))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(write '(log-server (version 0)) client)
|
||||
(force-output client)
|
||||
(proc client))
|
||||
(lambda args
|
||||
(let ((errno (system-error-errno args)))
|
||||
(when (memv errno (list EPIPE ECONNRESET ECONNABORTED))
|
||||
(log-error "~a when replying to ~a."
|
||||
(strerror errno) (fileno client)))))))))
|
||||
((() () ())
|
||||
#f)))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue