Commits

Felipe Lessa committed 92b5dbe

Avoid http-conduit exceptions from non-2XX codes and timeouts

  • Participants
  • Parent commits ea137f6

Comments (0)

Files changed (2)

lib/Network/HTTP/LoadTest.hs

         liftIO . threadDelay . truncate $ (interval - elapsed) * 1000000
       loop (n+1) (s:acc)
     issueRequest :: ResourceT IO (Response L.ByteString)
-    issueRequest = httpLbs (fromReq request) mgr
+    issueRequest = httpLbs (clear $ fromReq request) mgr
                    `catch` (throwIO . NetworkError)
+      where clear r = r { checkStatus = \_ _ -> Nothing
+                        , responseTimeout = Nothing
+                        }
     timedRequest :: ResourceT IO Event
     timedRequest
       | timeout == 0 = respEvent <$> issueRequest
     ghc-prim >= 0.2.0.0,
     hashable >= 1.2.0.2,
     hastache,
-    http-conduit >= 1.6,
+    http-conduit >= 1.7,
     http-types,
     lifted-base,
     meldable-heap,