on master help sign in
Fix test
commitdc69a02d706949d47a1045cda254f30345eb6b05 authorMichael Snoyman <michael@snoyman.com> dateTue 11 Mar 2014, 09:33 (13 years ago) parent2a2318e
1 file changed+2−2
warp/test/RunSpec.hs+2−2
warp/test/RunSpec.hs+2−2
@@ -77,14 +77,14 @@ getPort = do
7777 port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p)
7878 esocket <- try $ bindPort port HostIPv4
7979 case esocket of
80− Left (_ :: IOException) -> getPort
80+ Left (_ :: IOException) -> RunSpec.getPort
8181 Right socket -> do
8282 sClose socket
8383 return port
8484
8585withApp :: Settings -> Application -> (Int -> IO a) -> IO a
8686withApp settings app f = do
87− port <- getPort
87+ port <- RunSpec.getPort
8888 baton <- newEmptyMVar
8989 let settings' = setPort port
9090 $ setBeforeMainLoop (putMVar baton ())