summaryrefslogtreecommitdiff
path: root/cli/ops/tls.rs
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2020-03-10 19:14:22 +0000
committerGitHub <noreply@github.com>2020-03-10 15:14:22 -0400
commit55119aaee2e5fec8074373ef51b56d5095da1faf (patch)
treec1ad9bc7526ffa0941df4c552e0ddf113beac9df /cli/ops/tls.rs
parent8078d976d29aa12819e3f5a781c846d67868b0d6 (diff)
refactor(cli/js/net): Cleanup iterable APIs (#4236)
Listener and UDPConn are AsyncIterables instead of AsyncIterators. The [Symbol.asyncIterator]()s are defined as generators and the next() methods are gone. "Listener/Socket has been closed" errors are now BadResource.
Diffstat (limited to 'cli/ops/tls.rs')
-rw-r--r--cli/ops/tls.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/ops/tls.rs b/cli/ops/tls.rs
index da34a1a13..e64bc4745 100644
--- a/cli/ops/tls.rs
+++ b/cli/ops/tls.rs
@@ -283,7 +283,7 @@ fn op_accept_tls(
let listener_resource = resource_table
.get_mut::<TlsListenerResource>(rid)
.ok_or_else(|| {
- OpError::other("Listener has been closed".to_string())
+ OpError::bad_resource("Listener has been closed".to_string())
})?;
let listener = &mut listener_resource.listener;
match listener.poll_accept(cx).map_err(OpError::from) {