do not sending pending if io hasn't been opened yet (as protocol might have to be negotiated first

This commit is contained in:
HoneyryderChuck 2017-12-11 16:00:45 +00:00
parent 5218f5a87b
commit 1da2d0829a

View File

@ -115,6 +115,7 @@ module HTTPX
end
def send_pending
return if @io.closed?
while (request, args = @pending.shift)
parser.send(request, **args)
end