27 lines
1.6 KiB
Diff
27 lines
1.6 KiB
Diff
diff --git server/src-lib/Hasura/GraphQL/Transport/WebSocket/Server.hs server/src-lib/Hasura/GraphQL/Transport/WebSocket/Server.hs
|
|
index 6cb70cf0..0c3789cd 100644
|
|
--- server/src-lib/Hasura/GraphQL/Transport/WebSocket/Server.hs
|
|
+++ server/src-lib/Hasura/GraphQL/Transport/WebSocket/Server.hs
|
|
@@ -45,7 +45,7 @@ import GHC.AssertNF
|
|
import qualified ListT
|
|
import qualified Network.WebSockets as WS
|
|
import qualified StmContainers.Map as STMMap
|
|
-import qualified System.IO.Error as E
|
|
+--import qualified System.IO.Error as E
|
|
|
|
import qualified Hasura.Logging as L
|
|
|
|
@@ -287,12 +287,6 @@ createServerApp (WSServer logger@(L.Logger writeLog) serverStatus) wsHandlers !p
|
|
let rcv = forever $ do
|
|
-- Process all messages serially (important!), in a separate thread:
|
|
msg <- liftIO $
|
|
- -- Re-throw "receiveloop: resource vanished (Connection reset by peer)" :
|
|
- -- https://github.com/yesodweb/wai/blob/master/warp/Network/Wai/Handler/Warp/Recv.hs#L112
|
|
- -- as WS exception signaling cleanup below. It's not clear why exactly this gets
|
|
- -- raised occasionally; I suspect an equivalent handler is missing from WS itself.
|
|
- -- Regardless this should be safe:
|
|
- handleJust (guard . E.isResourceVanishedError) (\()-> throw WS.ConnectionClosed) $
|
|
WS.receiveData conn
|
|
writeLog $ WSLog wsId (EMessageReceived $ TBS.fromLBS msg) Nothing
|
|
_hOnMessage wsHandlers wsConn msg
|