aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-11 15:10:06 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-11 15:10:06 -0700
commit7141e19a101d3afc22226bbde2a7630f939a7ee1 (patch)
tree7bd14a7e34efbfecf08b3d2dfd569505c72e45bb /src
parent5c08200b1845fad5a97c864a63c3f03424c15fab (diff)
downloadbun-7141e19a101d3afc22226bbde2a7630f939a7ee1.tar.gz
bun-7141e19a101d3afc22226bbde2a7630f939a7ee1.tar.zst
bun-7141e19a101d3afc22226bbde2a7630f939a7ee1.zip
fixup
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/http.exports.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bun.js/http.exports.js b/src/bun.js/http.exports.js
index 539f7f8f8..8fe1265c5 100644
--- a/src/bun.js/http.exports.js
+++ b/src/bun.js/http.exports.js
@@ -238,7 +238,8 @@ export class Server extends EventEmitter {
close(optionalCallback) {
const server = this.#server;
if (!server) {
- if (typeof optionalCallback === "function") process.nextTick(new Error("Server is not running"));
+ if (typeof optionalCallback === "function")
+ process.nextTick(optionalCallback, new Error("Server is not running"));
return;
}
this.#server = undefined;