aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2023-01-15 13:19:37 +0200
committerGravatar GitHub <noreply@github.com> 2023-01-15 03:19:37 -0800
commit7932a558703d7f7f2c655383f25d2432bb2e6263 (patch)
treeac7f6f7b690a10deb6e384fc4f029a1a0e196a84 /src
parent893ec2fb45ae2b39a28864b6d1c9992a694be9cb (diff)
downloadbun-7932a558703d7f7f2c655383f25d2432bb2e6263.tar.gz
bun-7932a558703d7f7f2c655383f25d2432bb2e6263.tar.zst
bun-7932a558703d7f7f2c655383f25d2432bb2e6263.zip
fix handler reset in `Server.reload()` (#1801)
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/api/server.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index d99d7c9be..485b9c1eb 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -4142,11 +4142,11 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type {
if (exception.* != null) return js.JSValueMakeUndefined(ctx);
// only reload those two
- if (new_config.onRequest != .zero) {
+ if (this.config.onRequest != new_config.onRequest) {
this.config.onRequest.unprotect();
this.config.onRequest = new_config.onRequest;
}
- if (new_config.onError != .zero) {
+ if (this.config.onError != new_config.onError) {
this.config.onError.unprotect();
this.config.onError = new_config.onError;
}