From 81034e017e265e3fb62f12472083510ae5e7e6e4 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 16 May 2019 14:58:33 +0100 Subject: [PATCH] Close input/output ports in web.rkt once connection is logically over --- imperative/drivers/web.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imperative/drivers/web.rkt b/imperative/drivers/web.rkt index 19e5b6b..818940f 100644 --- a/imperative/drivers/web.rkt +++ b/imperative/drivers/web.rkt @@ -285,6 +285,8 @@ (output-response/method conn resp (request-method req)) (when (not should-close?) (do-request))]))))) + (with-handlers ([exn:fail? (lambda (e) (values #f #f))]) (close-input-port i)) + (with-handlers ([exn:fail? (lambda (e) (values #f #f))]) (close-output-port o)) (signal-background-activity! -1)))) (define ((websocket-connection-main id ws-ch) wsc _ws-connection-state)