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:
parent
e6a7699ef4
commit
a7227450ca
|
@ -86,24 +86,22 @@
|
||||||
(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
|
(with-handler
|
||||||
(lambda (exit)
|
(lambda (condition more)
|
||||||
(with-handler
|
(with-handler
|
||||||
(lambda (condition more)
|
(lambda (condition ignore) (more))
|
||||||
(with-handler
|
(lambda () (close-socket sock)))
|
||||||
(lambda (condition ignore) (more))
|
(more))
|
||||||
(lambda () (close-socket sock)))
|
(lambda ()
|
||||||
(exit 'interrupted))
|
(let loop ()
|
||||||
(lambda ()
|
(with-errno-handler
|
||||||
(let loop ()
|
;; ECONNABORTED we just ignore
|
||||||
(with-errno-handler
|
((errno packet)
|
||||||
;; ECONNABORTED we just ignore
|
((errno/connaborted) (loop)))
|
||||||
((errno packet)
|
(call-with-values
|
||||||
((errno/connaborted) (loop)))
|
(lambda () (accept-connection sock))
|
||||||
(call-with-values
|
proc)
|
||||||
(lambda () (accept-connection sock))
|
(loop)))))))
|
||||||
proc)
|
|
||||||
(loop)))))))))
|
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
;;; Socket Record Structure
|
;;; Socket Record Structure
|
||||||
|
|
Loading…
Reference in New Issue