Catch not-connected error to SHUTDOWN-SOCKET.

Close socket upon finish.
This commit is contained in:
sperber 2001-06-19 10:48:45 +00:00
parent db59a087ab
commit 2c1b13bd60
1 changed files with 13 additions and 2 deletions

View File

@ -78,7 +78,18 @@
(lambda ()
(handle-connection (socket:inport socket)
(socket:outport socket))
(shutdown-socket socket shutdown/sends+receives))))
(call-with-current-continuation
(lambda (exit)
(with-errno-handler*
(lambda (errno packet)
(cond
;; I dunno why SHUTDOWN-SOCKET can die this way, but it
;; can and does
((= errno errno/notconn)
(exit 'fick-dich-ins-knie))))
(lambda ()
(shutdown-socket socket shutdown/sends+receives)
(close-socket socket))))))))
port)))
@ -781,7 +792,7 @@
; Version
(define *ftpd-version* "$Revision: 1.5 $")
(define *ftpd-version* "$Revision: 1.6 $")
(define (copy-port->port-binary input-port output-port)
(let ((buffer (make-string *window-size*)))