File tree Expand file tree Collapse file tree
greskell-websocket/src/Network/Greskell/WebSocket/Connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ runMuxLoop wsconn req_pool settings qreq qres readConnState rx_thread = loop
262262 <|> (EvRes <$> readTQueue qres)
263263 <|> makeEvActiveClose
264264 <|> (rxResultToEvent <$> waitCatchSTM rx_thread)
265- <|> (timeoutToEvent <$> waitAnySTM res_timers)
265+ <|> waitResponseTimeout res_timers
266266 where
267267 max_concurrency = Settings. concurrency settings
268268 cur_concurrency = length res_timers
@@ -278,6 +278,11 @@ runMuxLoop wsconn req_pool settings qreq qres readConnState rx_thread = loop
278278 else do
279279 conn_state <- readConnState
280280 if conn_state == ConnOpen then empty else return EvActiveClose
281+ waitResponseTimeout timers =
282+ if null timers
283+ then empty
284+ else
285+ timeoutToEvent <$> waitAnySTM timers
281286 handleReq req = do
282287 insert_ok <- tryInsertToReqPool req_pool rid makeNewEntry
283288 if insert_ok
You can’t perform that action at this time.
0 commit comments