mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
fix: handle multi goaway frames coming from server
nodejs servers, for example, seem to send them when shutting down servers on timeout; when receiving, in the same buffer, the first correctly closes the parser and emits the message, while the second, because the parser is closed already, will emit an exception; the regression happened because the second exception was swallowed by the pool handler, but now that's gone, and errors on connection consumption get handled; this was worked around by, on the parser, when emitting the errors for pending requests, claearing the queue, as when the second error comes, there's no request to emit the error for Closes #333
This commit is contained in:
parent
999d86ae3e
commit
2a1338ca5b
@ -137,7 +137,7 @@ module HTTPX
|
|||||||
|
|
||||||
emit(:error, req, ex)
|
emit(:error, req, ex)
|
||||||
end
|
end
|
||||||
@pending.each do |req|
|
while (req = @pending.shift)
|
||||||
next if request && request == req
|
next if request && request == req
|
||||||
|
|
||||||
emit(:error, req, ex)
|
emit(:error, req, ex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user