Close input/output ports in web.rkt once connection is logically over

This commit is contained in:
Tony Garnock-Jones 2019-05-16 14:58:33 +01:00
parent 025f101d09
commit cd2d7e428b
1 changed files with 2 additions and 0 deletions

View File

@ -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)