summaryrefslogtreecommitdiff
path: root/ext/websocket/lib.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-06-29 07:24:01 -0600
committerGitHub <noreply@github.com>2023-06-29 07:24:01 -0600
commit93b3ff017078b2c1e993457ef43af6b52e715ba6 (patch)
tree856d339ae30fef01566d5ea919d4738c1e3fa65d /ext/websocket/lib.rs
parentb6253370cc8e430c575acd3fce0da44e057eb5b9 (diff)
fix(ext/websocket): Ensure that errors are available after async response returns (#19642)
Fixes the WPT tests that test w/invalid codes. Also explicitly ignoring some h2 tests to hopefully prevent flakes. The previous changes to WebSocketStream introduced a bug where the close errors were not made available if the `pull` method was re-entrant.
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r--ext/websocket/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index dd975589c..a8d18b4ad 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -591,10 +591,8 @@ pub async fn op_ws_next_event(
Ok(val) => val,
Err(err) => {
// No message was received, socket closed while we waited.
- // Try close the stream, ignoring any errors, and report closed status to JavaScript.
+ // Report closed status to JavaScript.
if resource.closed.get() {
- let _ = state.borrow_mut().resource_table.close(rid);
- resource.set_error(None);
return MessageKind::ClosedDefault as u16;
}