summaryrefslogtreecommitdiff
path: root/ext/http/00_serve.js
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2023-10-09 12:43:14 +0900
committerGitHub <noreply@github.com>2023-10-09 12:43:14 +0900
commitae81065c758a540aa61639e51372c1e254d92c9a (patch)
tree0012576dc0cce32460c0bbab99d615ea80846c5a /ext/http/00_serve.js
parent35f028daf27bb40e86829e7b7cc19aa72a62c0a0 (diff)
fix(ext/http): Deno.Server should not be thenable (#20723)
Otherwise you can not return `Deno.Server` from async functions. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/http/00_serve.js')
-rw-r--r--ext/http/00_serve.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js
index e74e1e71f..2e0c62fef 100644
--- a/ext/http/00_serve.js
+++ b/ext/http/00_serve.js
@@ -38,7 +38,6 @@ import { listen, listenOptionApiName, TcpConn } from "ext:deno_net/01_net.js";
import { listenTls } from "ext:deno_net/02_tls.js";
const {
ArrayPrototypePush,
- Error,
ObjectHasOwn,
ObjectPrototypeIsPrototypeOf,
PromisePrototypeCatch,
@@ -700,11 +699,6 @@ function serveHttpOn(context, callback) {
context.closed = true;
}
},
- then() {
- throw new Error(
- "Deno.serve no longer returns a promise. await server.finished instead of server.",
- );
- },
ref() {
ref = true;
if (currentPromise) {