Catch not-connected error to SHUTDOWN-SOCKET.
Close socket upon finish.
This commit is contained in:
parent
db59a087ab
commit
2c1b13bd60
15
ftpd.scm
15
ftpd.scm
|
@ -78,7 +78,18 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(handle-connection (socket:inport socket)
|
(handle-connection (socket:inport socket)
|
||||||
(socket:outport 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)))
|
port)))
|
||||||
|
|
||||||
|
@ -781,7 +792,7 @@
|
||||||
|
|
||||||
; Version
|
; Version
|
||||||
|
|
||||||
(define *ftpd-version* "$Revision: 1.5 $")
|
(define *ftpd-version* "$Revision: 1.6 $")
|
||||||
|
|
||||||
(define (copy-port->port-binary input-port output-port)
|
(define (copy-port->port-binary input-port output-port)
|
||||||
(let ((buffer (make-string *window-size*)))
|
(let ((buffer (make-string *window-size*)))
|
||||||
|
|
Loading…
Reference in New Issue