packages feed

websockets-simple 0.0.6.2 → 0.0.6.3

raw patch · 2 files changed

+14/−18 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Test/WebSockets/Simple.hs view
@@ -15,7 +15,7 @@ import Control.Concurrent (threadDelay) import Control.Concurrent.Async (Async, async) import Control.Concurrent.STM (atomically)-import Control.Concurrent.STM.TChan (TChan, newTChan, writeTChan, readTChan, tryReadTChan)+import Control.Concurrent.STM.TChan (TChan, newTChan, writeTChan, readTChan, tryReadTChan, isEmptyTChan)   @@ -42,24 +42,20 @@         onClose sendsSreceivesR Nothing    sToR <- liftBaseWith $ \runInBase -> async $ forever $ do-    mS <- atomically $ tryReadTChan sendChan-    case mS of-      Nothing -> threadDelay 100-      Just s ->-        void $ runInBase $ onReceive sendsRreceivesS WebSocketsAppParams-          { send = sendToReceive-          , close-          } s+    _ <- atomically $ isEmptyTChan sendChan+    s <- atomically $ readTChan sendChan+    void $ runInBase $ onReceive sendsRreceivesS WebSocketsAppParams+      { send = sendToReceive+      , close+      } s    rToS <- liftBaseWith $ \runInBase -> async $ forever $ do-    mR <- atomically $ tryReadTChan receiveChan-    case mR of-      Nothing -> threadDelay 100-      Just r ->-        void $ runInBase $ onReceive sendsSreceivesR WebSocketsAppParams-          { send = sendToSend-          , close-          } r+    _ <- atomically $ isEmptyTChan receiveChan+    r <- atomically $ readTChan receiveChan+    void $ runInBase $ onReceive sendsSreceivesR WebSocketsAppParams+      { send = sendToSend+      , close+      } r    onOpen sendsRreceivesS WebSocketsAppParams     { send = sendToReceive
websockets-simple.cabal view
@@ -1,5 +1,5 @@ name:                websockets-simple-version:             0.0.6.2+version:             0.0.6.3 synopsis:            Simpler interface to the websockets api -- description: homepage:            https://github.com/athanclark/websockets-simple#readme