@@ -90,8 +90,8 @@ getPort = do
9090 esocket <- try $ bindPortTCP port "127.0.0.1"
9191 case esocket of
9292 Left (_ :: IOException) -> RunSpec.getPort
93− Right socket -> do
94− close socket
93+ Right sock -> do
94+ close sock
9595 return port
9696
9797withApp :: Settings -> Application -> (Int -> IO a) -> IO a
@@ -370,11 +370,11 @@ spec = do
370370 loop
371371 loop
372372 withApp defaultSettings app $ \port -> do
373− (socket, _addr) <- getSocketTCP "127.0.0.1" port
374− sendAll socket "POST / HTTP/1.1\r\ntransfer-encoding: chunked\r\n\r\n"
373+ (sock, _addr) <- getSocketTCP "127.0.0.1" port
374+ sendAll sock "POST / HTTP/1.1\r\ntransfer-encoding: chunked\r\n\r\n"
375375 threadDelay 10000
376− sendAll socket "5\r\nhello\r\n0\r\n\r\n"
377− bs <- safeRecv socket 4096
376+ sendAll sock "5\r\nhello\r\n0\r\n\r\n"
377+ bs <- safeRecv sock 4096
378378 S.takeWhile (/= 13) bs `shouldBe` "HTTP/1.1 200 OK"
379379
380380 it "streaming response with length" $ do