on master help sign in
adding comment.
commitceea765adde57fe0ee043b5fe2e947302a23e620 authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 8 Jan 2020, 20:28 (7 years ago) parent85a788c
1 file changed+7
warp/Network/Wai/Handler/Warp/Run.hs+7
warp/Network/Wai/Handler/Warp/Run.hs+7
@@ -350,6 +350,13 @@ serveConnection conn ii th origAddr transport settings app = do
350350 istatus <- newIORef False
351351 if settingsHTTP2Enabled settings && h2 then do
352352 rawRecvN <- makeReceiveN bs (connRecv conn) (connRecvBuf conn)
353+ -- This thread becomes the sender in http2 library.
354+ -- In the case of event source, one request comes and one
355+ -- worker gets busy. But it is likely that the receiver does
356+ -- not receive any data at all while the sender is sending
357+ -- output data from the worker. It's not good enough to tickle
358+ -- the time handler in the receiver only. So, we should tickle
359+ -- the time handler in both the receiver and the sender.
353360 let recvN = wrappedRecvN th istatus (settingsSlowlorisSize settings) rawRecvN
354361 sendBS x = connSendAll conn x >> T.tickle th
355362 -- fixme: origAddr