Skip to content

Commit 81271c6

Browse files
committed
Close streams before closing framer. Ensure @framer is set to nil.
1 parent 0fab28b commit 81271c6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/protocol/http2/connection.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ def delete(id)
110110

111111
# Close the underlying framer and all streams.
112112
def close(error = nil)
113-
@framer.close
114-
# @framer = nil
115-
113+
# The underlying socket may already be closed by this point.
116114
@streams.each_value{|stream| stream.close(error)}
115+
116+
@framer.close
117+
@framer = nil
117118
end
118119

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

0 commit comments

Comments
 (0)