diff options
Diffstat (limited to 'src/Attach.hs')
| -rw-r--r-- | src/Attach.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Attach.hs b/src/Attach.hs index c15b0a5..cf6bd1c 100644 --- a/src/Attach.hs +++ b/src/Attach.hs @@ -30,7 +30,7 @@ import Text.Blaze.Html5 qualified as H import Text.Blaze.Html5.Attributes qualified as A import JavaScript -import WebSocket (startClient, receiveMessage) +import WebSocket (startDefaultWebSocketConnections) data AttachState = AttachState @@ -120,11 +120,7 @@ initiateAttachConnection baseHead dgst = do Nothing -> return () locationAssign "./" - startClient asServer "a.discovery.erebosprotocol.net" 443 "" $ \conn -> do - void $ forkIO $ forever $ do - msg <- receiveMessage conn - receivedFromCustomAddress asServer conn msg - void $ serverPeerCustom asServer conn + startDefaultWebSocketConnections asServer runExceptT (discoverySearch asServer dgst) >>= \case Right _ -> return () |