From 9db99b091c4ec34626ccc7b834b53bdeac1433bf Mon Sep 17 00:00:00 2001 From: uid35759 Date: Wed, 4 Jul 2001 11:26:15 +0000 Subject: [PATCH] Ignore ERRNO/CONNABORTED in BIND-LISTEN-ACCEPT-LOOP. --- scsh/network.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scsh/network.scm b/scsh/network.scm index f499372..7003ea5 100644 --- a/scsh/network.scm +++ b/scsh/network.scm @@ -81,16 +81,19 @@ protocol-family/unix) (unix-address->socket-address arg)) (else - (error "bind-listen-accept-loop: unsupported protocol-family ~s" - protocol-family))))) + (error "bind-listen-accept-loop: unsupported protocol-family ~s" + protocol-family))))) (set-socket-option sock level/socket socket/reuse-address #t) (bind-socket sock addr) (listen-socket sock 5) (let loop () - (call-with-values - (lambda () (accept-connection sock)) - proc) - (loop)))) + (with-errno-handler + ;; ECONNABORTED we just ignore + ((errno packet) ((errno/connaborted) (loop))) + (call-with-values + (lambda () (accept-connection sock)) + proc) + (loop))))) ;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ;;; Socket Record Structure