Closed Scrxtchy closed 7 years ago
This really shouldn't be an issue as I literally already do this. Look at the bottom of server.js
No clue why it isn't working for you though.
Could be that ZNC is trying to keep it alive https://nodejs.org/api/net.html#net_server_close_callback
Right. I'll also make sure all sockets are closed.
Gracefully shutting down from SIGINT (Ctrl-C)
/mnt/mpathag/scratch/node/discordIRCd/server.js:1452
socket.close()
^
TypeError: socket.close is not a function
at /mnt/mpathag/scratch/node/discordIRCd/server.js:1452:16
at Array.forEach (native)
at process.<anonymous> (/mnt/mpathag/scratch/node/discordIRCd/server.js:1451:16)
at emitNone (events.js:86:13)
at process.emit (events.js:186:7)
at Signal.wrap.onsignal (internal/process.js:200:44)
I don't get it But it looks like it's working
Oh that still might be an error. Let's see if I can make that go away.
Common issue I have after stopping the server to restart it / git pull After giving it a graceful shutdown via a SIGINT, the port still seems to be in use for another couple of minutes. Due to this, an error is thrown
Seems to already have a stackoverflow thread since it's common appearance, ...six years ago https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server I'm still unsure on the correct approach to a fix though