Removed call/cc from handler of bind-listen-accept-loop: We want to

close the socket, but not prevent the exception to come through
(Otherwise you get 'interrupted on undefined globals...).
This commit is contained in:
mainzelm 2001-07-10 11:26:54 +00:00
parent e6a7699ef4
commit a7227450ca
1 changed files with 15 additions and 17 deletions

View File

@ -86,14 +86,12 @@
(set-socket-option sock level/socket socket/reuse-address #t) (set-socket-option sock level/socket socket/reuse-address #t)
(bind-socket sock addr) (bind-socket sock addr)
(listen-socket sock 5) (listen-socket sock 5)
(call-with-current-continuation
(lambda (exit)
(with-handler (with-handler
(lambda (condition more) (lambda (condition more)
(with-handler (with-handler
(lambda (condition ignore) (more)) (lambda (condition ignore) (more))
(lambda () (close-socket sock))) (lambda () (close-socket sock)))
(exit 'interrupted)) (more))
(lambda () (lambda ()
(let loop () (let loop ()
(with-errno-handler (with-errno-handler
@ -103,7 +101,7 @@
(call-with-values (call-with-values
(lambda () (accept-connection sock)) (lambda () (accept-connection sock))
proc) proc)
(loop))))))))) (loop)))))))
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; Socket Record Structure ;;; Socket Record Structure