packages feed

ghcjs-websockets 0.3.0.4 → 0.3.0.5

raw patch · 3 files changed

+12/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,10 @@+0.3.0.5+-------+<https://github.com/mstksg/ghcjs-websockets/releases/tag/v0.3.0.5>++*   Fixing `withURL` blocking when there is a javascript error on connection.+    (Thanks to sztupi)+ 0.3.0.4 ------- <https://github.com/mstksg/ghcjs-websockets/releases/tag/v0.3.0.4>
ghcjs-websockets.cabal view
@@ -1,5 +1,5 @@ name:                ghcjs-websockets-version:             0.3.0.4+version:             0.3.0.5 synopsis:            GHCJS interface for the Javascript Websocket API description:                      Documentation online at
src/JavaScript/WebSockets/Internal.hs view
@@ -210,7 +210,7 @@     block   <- newMVar ()     let conn = Connection socket queue waiters url closed block     outp    <- newEmptyMVar-    _       <- forkIO $ handleClose conn+    _       <- forkIO $ handleClose conn outp     -- TODO: Opening errors     _       <- forkIO $ handleOpen conn outp     return outp@@ -231,8 +231,8 @@                       _ <- ws_handleOpen (_connSocket conn)                       putMVar connMVar conn -handleClose :: Connection -> IO ()-handleClose conn = do+handleClose :: Connection -> MVar Connection -> IO ()+handleClose conn connMVar = do     connState <- connectionStateCode conn     when (connState < 3) . handle handler $ do       closeEvent <- ws_handleClose (_connSocket conn)@@ -241,6 +241,7 @@       reason     <- fmap fromJSString <$> getPropMaybe ("reason" :: Text) closeEvent       let jsClose = JSClose wasClean code reason       _ <- _closeConnection jsClose False conn+      _ <- tryPutMVar connMVar conn       return ()   where     -- TODO: any way to reasonably restore the handler?