From 1da2d0829a265dc2b14304e9efbe8cfeedfa9c0c Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Mon, 11 Dec 2017 16:00:45 +0000 Subject: [PATCH] do not sending pending if io hasn't been opened yet (as protocol might have to be negotiated first --- lib/httpx/channel.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/httpx/channel.rb b/lib/httpx/channel.rb index 8fd2d955..13f5c0bb 100644 --- a/lib/httpx/channel.rb +++ b/lib/httpx/channel.rb @@ -115,6 +115,7 @@ module HTTPX end def send_pending + return if @io.closed? while (request, args = @pending.shift) parser.send(request, **args) end