diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-06-13 12:05:23 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 18:05:23 +0000 |
commit | 133f9a952bc317347fa6581a6a47e59287f5b960 (patch) | |
tree | e77c357d110caf9231399f711be4351d1a97de6b /ext/http/00_serve.js | |
parent | 72da18dd476e269a8677e698c01b08e683fac4a5 (diff) |
fix(ext/http): replace await Deno.serve with await Deno.serve().finished (#19485)
We have a bunch of these to clean up after we changed the API.
Diffstat (limited to 'ext/http/00_serve.js')
-rw-r--r-- | ext/http/00_serve.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index 47bbb7e7b..be9c9d801 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -38,6 +38,7 @@ import { listen, TcpConn } from "ext:deno_net/01_net.js"; import { listenTls } from "ext:deno_net/02_tls.js"; const { ArrayPrototypePush, + Error, ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, SafeSet, @@ -725,6 +726,11 @@ function serveHttpOn(context, callback) { return { finished, + then() { + throw new Error( + "Deno.serve no longer returns a promise. await server.finished instead of server.", + ); + }, ref() { ref = true; if (currentPromise) { |