@@ -213,7 +213,7 @@ serveConnection :: T.Handle
213 -> InternalInfo
213 -> InternalInfo
214 -> Application -> Connection -> SockAddr-> IO ()
214 -> Application -> Connection -> SockAddr-> IO ()
215serveConnection timeoutHandle settings ii app conn remoteHost' =
215serveConnection timeoutHandle settings ii app conn remoteHost' =
216− serveConnection' (connSource conn th) `onException` send500
216+ recvSendLoop (connSource conn th) `onException` send500
218 th = threadHandle ii
218 th = threadHandle ii
@@ -224,7 +224,7 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
225 internalError = responseLBS H.internalServerError500 [(H.hContentType, "text/plain")] "Something went wrong"
225 internalError = responseLBS H.internalServerError500 [(H.hContentType, "text/plain")] "Something went wrong"
227− serveConnection' fromClient = do
227+ recvSendLoop fromClient = do
228 (env, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
228 (env, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
229 case settingsIntercept settings env of
229 case settingsIntercept settings env of
230 Nothing -> do
230 Nothing -> do
@@ -252,7 +252,7 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
252 requestBody env $$ CL.sinkNull
252 requestBody env $$ CL.sinkNull
253 ResumableSource fromClient' _ <- liftIO getSource
253 ResumableSource fromClient' _ <- liftIO getSource
255− when keepAlive $ serveConnection' fromClient'
255+ when keepAlive $ recvSendLoop fromClient'
256 Just intercept -> do
256 Just intercept -> do
257 liftIO $ T.pause th
257 liftIO $ T.pause th
258 ResumableSource fromClient' _ <- liftIO getSource
258 ResumableSource fromClient' _ <- liftIO getSource