Disconnect websocket service on error

This commit is contained in:
Tony Garnock-Jones 2019-05-16 13:12:21 +01:00
parent c9b62c9a6d
commit 025f101d09
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@
(error 'server-facet/websocket "Multiple packets in a single websocket message"))
(!! (message-poa->server id packet)))
(on (message (message-server->poa id $p))
(send! (websocket-out id (encode p)))))
(send! (websocket-out id (encode p)))
(when (Err? p) (stop-current-facet))))
(define default-http-server-port 8000)