Skip to content

Commit a6db236

Browse files
committed
Atomic close write.
1 parent 91148f1 commit a6db236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/async/http/protocol/http2/stream.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def process_headers(frame)
6262
end
6363

6464
# TODO this might need to be in an ensure block:
65-
if @input and frame.end_stream?
66-
@input.close_write
65+
if input = @input and frame.end_stream?
6766
@input = nil
67+
input.close_write
6868
end
6969
rescue ::Protocol::HTTP2::HeaderError => error
7070
Console.logger.debug(self, error)

0 commit comments

Comments
 (0)