@@ -90,8 +90,8 @@ getPort = do
90 esocket <- try $ bindPortTCP port "127.0.0.1"
90 esocket <- try $ bindPortTCP port "127.0.0.1"
91 case esocket of
91 case esocket of
92 Left (_ :: IOException) -> RunSpec.getPort
92 Left (_ :: IOException) -> RunSpec.getPort
93− Right socket -> do
93+ Right sock -> do
94− close socket
94+ close sock
95 return port
95 return port
97withApp :: Settings -> Application -> (Int -> IO a) -> IO a
97withApp :: Settings -> Application -> (Int -> IO a) -> IO a
@@ -370,11 +370,11 @@ spec = do
372 withApp defaultSettings app $ \port -> do
372 withApp defaultSettings app $ \port -> do
373− (socket, _addr) <- getSocketTCP "127.0.0.1" port
373+ (sock, _addr) <- getSocketTCP "127.0.0.1" port
374− sendAll socket "POST / HTTP/1.1\r\ntransfer-encoding: chunked\r\n\r\n"
374+ sendAll sock "POST / HTTP/1.1\r\ntransfer-encoding: chunked\r\n\r\n"
375 threadDelay 10000
375 threadDelay 10000
376− sendAll socket "5\r\nhello\r\n0\r\n\r\n"
376+ sendAll sock "5\r\nhello\r\n0\r\n\r\n"
377− bs <- safeRecv socket 4096
377+ bs <- safeRecv sock 4096
378 S.takeWhile (/= 13) bs `shouldBe` "HTTP/1.1 200 OK"
378 S.takeWhile (/= 13) bs `shouldBe` "HTTP/1.1 200 OK"
380 it "streaming response with length" $ do
380 it "streaming response with length" $ do