Skip to content
Browse files

Don't try to cancel non-existent stream

  • Loading branch information...
1 parent 876f7cb commit 1d31b9f1bcfa9e745ca0b67891eb9d8f7bdf250b @romanbsd committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/spdy/session.rb
View
5 lib/spdy/session.rb
@@ -114,8 +114,9 @@ def new_stream(stream_id, headers)
def remove_stream(stream_id)
logger.debug "Removing stream: #{stream_id}"
- stream = @streams.delete(stream_id)
- stream.cancel!
+ if stream = @streams.delete(stream_id)
+ stream.cancel!
+ end
rescue Exception => e
$stderr.puts "Exception: #{e.inspect} #{e.backtrace.join("\n")}"
end

0 comments on commit 1d31b9f

Please sign in to comment.
Something went wrong with that request. Please try again.