mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Don't call the onTimeout handler if the socket is closed, shutdown, or detached
This commit is contained in:
@@ -1296,7 +1296,7 @@ fn NewSocket(comptime ssl: bool) type {
|
||||
) void {
|
||||
JSC.markBinding(@src());
|
||||
log("onTimeout", .{});
|
||||
if (this.detached) return;
|
||||
if (this.detached or this.socket.isShutdown() or this.socket.isClosed()) return;
|
||||
|
||||
const handlers = this.handlers;
|
||||
const callback = handlers.onTimeout;
|
||||
|
||||
Reference in New Issue
Block a user