From 5b0752234993ee69e47c32db478d2a296f73f396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 19 May 2023 02:59:23 +0200 Subject: BREAKING(unstable): change return type of Deno.serve() API (#19189) This commit changes the return type of an unstable `Deno.serve()` API to instead return a `Deno.Server` object that has a `finished` field. This change is done in preparation to be able to ref/unref the HTTP server. --- ext/node/polyfills/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/polyfills') diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index adc5845b5..065ad2e0f 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -1577,7 +1577,7 @@ class ServerImpl extends EventEmitter { this.emit("listening"); }, }, - ).then(() => this.#servePromise!.resolve()); + ).finished.then(() => this.#servePromise!.resolve()); } setTimeout() { -- cgit v1.2.3