web: server: Handle client disconnection.
* src/web/server/fiberized.scm (client-loop): Catch EPIPE and ECONNRESET errors than can be thrown if the client disconnects prematurely.
This commit is contained in:
parent
6ad9c60269
commit
0955a11abd
|
@ -150,7 +150,13 @@
|
|||
(setsockopt client SOL_SOCKET SO_SNDBUF
|
||||
(* 128 1024))
|
||||
(if (file-port? output)
|
||||
(sendfile output input size)
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(sendfile output input size))
|
||||
(lambda args
|
||||
(unless (memv (system-error-errno args)
|
||||
(list EPIPE ECONNRESET))
|
||||
(apply throw args))))
|
||||
(dump-port input output))
|
||||
(close-port output)
|
||||
(values))))))
|
||||
|
|
Loading…
Reference in New Issue