summaryrefslogtreecommitdiff
path: root/ext/websocket/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r--ext/websocket/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index 4b05131d9..32e2d18cc 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -5,6 +5,7 @@ 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;
@@ -528,12 +529,12 @@ pub async fn op_ws_send_ping(
.await
}
-#[op(deferred)]
+#[op2(async(lazy))]
pub async fn op_ws_close(
state: Rc<RefCell<OpState>>,
- rid: ResourceId,
+ #[smi] rid: ResourceId,
code: Option<u16>,
- reason: Option<String>,
+ #[string] reason: Option<String>,
) -> Result<(), AnyError> {
let resource = state
.borrow_mut()