From 9e243d22f4ea9642e24415e5484f0f067f466ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 4 Sep 2023 23:05:06 +0200 Subject: Revert "refactor: rewrite ops that use 'deferred' to use 'op2(async(lazy))' (#20303) (#20370) This reverts commit https://github.com/denoland/deno/commit/83426be6eead06c680ae527468aeaf8723543ff2. Includes a regression test. --- ext/websocket/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ext/websocket/lib.rs') diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index 32e2d18cc..4b05131d9 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -5,7 +5,6 @@ use deno_core::error::invalid_hostname; use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::op; -use deno_core::op2; use deno_core::url; use deno_core::AsyncMutFuture; use deno_core::AsyncRefCell; @@ -529,12 +528,12 @@ pub async fn op_ws_send_ping( .await } -#[op2(async(lazy))] +#[op(deferred)] pub async fn op_ws_close( state: Rc>, - #[smi] rid: ResourceId, + rid: ResourceId, code: Option, - #[string] reason: Option, + reason: Option, ) -> Result<(), AnyError> { let resource = state .borrow_mut() -- cgit v1.2.3