lib/httpx/connection/http2.rb in httpx-0.5.0 vs lib/httpx/connection/http2.rb in httpx-0.5.1

- old
+ new

@@ -196,11 +196,11 @@ end def on_stream_close(stream, request, error) return handle(request, stream) if request.expects? - if error + if error && error != :no_error ex = Error.new(stream.id, error) ex.set_backtrace(caller) emit(:error, request, ex) else response = request.response @@ -228,10 +228,10 @@ @connection.remote_settings[:settings_max_concurrent_streams]].min send_pending end def on_close(_last_frame, error, _payload) - if error + if error && error != :no_error ex = Error.new(0, error) ex.set_backtrace(caller) @streams.each_key do |request| emit(:error, request, ex) end