@@ -165,7 +165,7 @@ testEarlyDisconnect = do
165
165
(clientPort, _) <- forkServer " 127.0.0.1" " 0" 5 True throwIO $ \ sock -> do
166
166
-- Initial setup
167
167
0 <- recvWord32 sock
168
- _ <- recvWithLength sock
168
+ _ <- recvWithLength Nothing sock
169
169
sendMany sock [encodeWord32 (encodeConnectionRequestResponse ConnectionRequestAccepted )]
170
170
171
171
-- Server opens a logical connection
@@ -174,7 +174,7 @@ testEarlyDisconnect = do
174
174
175
175
-- Server sends a message
176
176
1024 <- recvWord32 sock
177
- [" ping" ] <- recvWithLength sock
177
+ [" ping" ] <- recvWithLength Nothing sock
178
178
179
179
-- Reply
180
180
sendMany sock [
@@ -277,7 +277,7 @@ testEarlyCloseSocket = do
277
277
(clientPort, _) <- forkServer " 127.0.0.1" " 0" 5 True throwIO $ \ sock -> do
278
278
-- Initial setup
279
279
0 <- recvWord32 sock
280
- _ <- recvWithLength sock
280
+ _ <- recvWithLength Nothing sock
281
281
sendMany sock [encodeWord32 (encodeConnectionRequestResponse ConnectionRequestAccepted )]
282
282
283
283
-- Server opens a logical connection
@@ -286,7 +286,7 @@ testEarlyCloseSocket = do
286
286
287
287
-- Server sends a message
288
288
1024 <- recvWord32 sock
289
- [" ping" ] <- recvWithLength sock
289
+ [" ping" ] <- recvWithLength Nothing sock
290
290
291
291
-- Reply
292
292
sendMany sock [
@@ -620,7 +620,7 @@ testReconnect = do
620
620
(serverPort, _) <- forkServer " 127.0.0.1" " 0" 5 True throwIO $ \ sock -> do
621
621
-- Accept the connection
622
622
Right 0 <- tryIO $ recvWord32 sock
623
- Right _ <- tryIO $ recvWithLength sock
623
+ Right _ <- tryIO $ recvWithLength Nothing sock
624
624
625
625
-- The first time we close the socket before accepting the logical connection
626
626
count <- modifyMVar counter $ \ i -> return (i + 1 , i)
@@ -639,7 +639,7 @@ testReconnect = do
639
639
-- Client sends a message
640
640
Right connId' <- tryIO $ (recvWord32 sock :: IO LightweightConnectionId )
641
641
True <- return $ connId == connId'
642
- Right [" ping" ] <- tryIO $ recvWithLength sock
642
+ Right [" ping" ] <- tryIO $ recvWithLength Nothing sock
643
643
putMVar serverDone ()
644
644
645
645
Right () <- tryIO $ N. sClose sock
@@ -712,15 +712,15 @@ testUnidirectionalError = do
712
712
-- would shutdown the socket in the other direction)
713
713
void . (try :: IO () -> IO (Either SomeException () )) $ do
714
714
0 <- recvWord32 sock
715
- _ <- recvWithLength sock
715
+ _ <- recvWithLength Nothing sock
716
716
() <- sendMany sock [encodeWord32 (encodeConnectionRequestResponse ConnectionRequestAccepted )]
717
717
718
718
Just CreatedNewConnection <- decodeControlHeader <$> recvWord32 sock
719
719
connId <- recvWord32 sock :: IO LightweightConnectionId
720
720
721
721
connId' <- recvWord32 sock :: IO LightweightConnectionId
722
722
True <- return $ connId == connId'
723
- [" ping" ] <- recvWithLength sock
723
+ [" ping" ] <- recvWithLength Nothing sock
724
724
putMVar serverGotPing ()
725
725
726
726
-- Client
0 commit comments