Skip to content

Commit 60408e6

Browse files
committed
Don't break when retiring a connection from the pool.
1 parent d7d5a16 commit 60408e6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/protocol/http2/connection.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ def delete(id)
112112
def close(error = nil)
113113
# The underlying socket may already be closed by this point.
114114
@streams.each_value{|stream| stream.close(error)}
115+
@streams.clear
115116

116-
@framer.close
117-
@framer = nil
117+
if @framer
118+
@framer.close
119+
@framer = nil
120+
end
118121
end
119122

120123
def encode_headers(headers, buffer = String.new.b)

0 commit comments

Comments
 (0)