Skip to content
Snippets Groups Projects
Commit 4322be29 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix this.sock is undefined error.

Not sure how we get a successful shutdown after closing the socket,
but the issue was reported by altere as happening in the wild.
parent f57d4abe
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -940,6 +940,7 @@ BinkP.prototype.close = function()
this.sendCmd(this.command.M_EOB);
}
// Attempt a super-duper graceful shutdown to prevent RST...
if (this.sock !== undefined) {
this.sock.is_writeable = false;
remain = this.timeout;
end = time() + remain;
......@@ -949,6 +950,8 @@ BinkP.prototype.close = function()
remain = end - time();
} while (remain > 0);
this.sock.close();
this.sock = undefined;
}
}
this.tx_queue.forEach(function(file) {
file.file.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment