We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c3d6d9 commit 2495d7bCopy full SHA for 2495d7b
lib/async/http/protocol/http2/output.rb
@@ -71,10 +71,15 @@ def write(chunk)
71
end
72
73
74
+ # This method should only be called from within the context of the output task.
75
def close(error = nil)
- @stream.finish_output(error)
76
+ if @stream
77
+ @stream.finish_output(error)
78
+ @stream = nil
79
+ end
80
81
82
+ # This method should only be called from within the context of the HTTP/2 stream.
83
def stop(error)
84
@task&.stop
85
@task = nil
@@ -103,7 +108,7 @@ def passthrough(task)
103
108
# GC.start
104
109
105
110
106
- @stream.finish_output
111
+ self.close
107
112
ensure
113
@body&.close($!)
114
@body = nil
0 commit comments