From 93b3ff017078b2c1e993457ef43af6b52e715ba6 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Thu, 29 Jun 2023 07:24:01 -0600 Subject: 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. --- ext/websocket/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext/websocket/lib.rs') 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; } -- cgit v1.2.3