From 2c5afc09ad8aacbb3f808345fc8aee0cbd5a889d Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Sat, 5 Feb 2022 13:46:13 +0100 Subject: [PATCH] Fixed parser issue --- IHP/WebSocket.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/IHP/WebSocket.hs b/IHP/WebSocket.hs index 1489eebec..0ec050cb7 100644 --- a/IHP/WebSocket.hs +++ b/IHP/WebSocket.hs @@ -54,12 +54,12 @@ startWSApp connection = do let ?connection = connection let runWithPongChan pongChan = do - let connectionOnPong = writeChan pongChan () - let ?connection = connection - { WebSocket.connectionOptions = (get #connectionOptions connection) { WebSocket.connectionOnPong } - } - in - run @state + let connectionOnPong = writeChan pongChan () + let ?connection = connection + { WebSocket.connectionOptions = (get #connectionOptions connection) { WebSocket.connectionOnPong } + } + in + run @state result <- Exception.try ((withPinger connection runWithPongChan) `Exception.finally` onClose @state) case result of