File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
proxygen/lib/http/webtransport/test Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ class FakeStreamHandle
87
87
return folly::unit;
88
88
}
89
89
90
+ bool open () const {
91
+ return !fin_ && !writeErr_ && (!promise_ || !promise_->isFulfilled ());
92
+ }
93
+
90
94
uint64_t id{0 };
91
95
folly::CancellationSource cs_;
92
96
folly::Optional<folly::Promise<WebTransport::StreamData>> promise_;
@@ -221,7 +225,9 @@ class FakeSharedWebTransport : public WebTransport {
221
225
folly::Expected<folly::Unit, ErrorCode> closeSession (
222
226
folly::Optional<uint32_t > error = folly::none) override {
223
227
for (auto & h : writeHandles) {
224
- h.second ->resetStream (std::numeric_limits<uint32_t >::max ());
228
+ if (h.second ->open ()) {
229
+ h.second ->resetStream (std::numeric_limits<uint32_t >::max ());
230
+ }
225
231
}
226
232
writeHandles.clear ();
227
233
for (auto & h : readHandles) {
You can’t perform that action at this time.
0 commit comments