Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
socket.close() keeps process open.
Steps to reproduce (if the current behaviour is a bug)
close the socket and receive close event. The close is timed out 10 seconds.
At first I thought it could be because of uws, but I switched to ws and the same results happens.
Expected behaviour
close the socket, clear intervals, exit
Setup
- OS: MacOS Sierra
- browser:
- engine.io version: 1.8.2
Other information (e.g. stacktraces, related issues, suggestions how to fix)
engine.io-client:polling polling got data 1:6 +79ms
engine.io-client:socket socket receive: type "noop", data "undefined" +2ms
engine.io-client:polling pre-pause polling complete +3ms
engine.io-client:polling paused +2ms
engine.io-client:socket changing transport and sending upgrade packet +1ms
engine.io-client:socket setting transport websocket +1ms
engine.io-client:socket clearing existing transport polling +1ms
engine.io-client:polling ignoring poll - transport state "paused" +2ms
GET MF
GET MF
engine.io-client:socket socket close with reason: "forced close" +10s
V Socket closed forced close +10s
engine.io-client:socket socket closing - telling transport to close +3ms
engine.io-client:socket writing ping packet - expecting pong within 60000ms +15s
engine.io-client:socket flushing 1 packets in socket +1ms
engine.io-client:socket socket receive: type "pong", data "undefined" +2ms
engine.io-client:socket writing ping packet - expecting pong within 60000ms +25s
engine.io-client:socket flushing 1 packets in socket +0ms
engine.io-client:socket socket receive: type "pong", data "undefined" +3ms
engine.io-client:socket writing ping packet - expecting pong within 60000ms +25s
engine.io-client:socket flushing 1 packets in socket +1ms
engine.io-client:socket socket receive: type "pong", data "undefined" +3ms
engine.io-client:socket writing ping packet - expecting pong within 60000ms +25s
engine.io-client:socket flushing 1 packets in socket +1ms
engine.io-client:socket socket receive: type "pong", data "undefined" +1ms
With why-is-node-running:
There are 5 known handle(s) keeping the process running and 0 unknown
Known handles:
# TTY
internal/process/stdio.js:143
internal/process/stdio.js:10
/usr/local/lib/node_modules/why-is-node-running/cli.js:7 - console.log('probing program', prog)
# TTY
internal/process/stdio.js:143
internal/process/stdio.js:23
/usr/local/lib/node_modules/why-is-node-running/cli.js:7 - console.log('probing program', prog)
# TCP
/Users/diego/Projects/Node Modules/v/node_modules/ws/lib/WebSocket.js:708 - var req = httpObj.request(requestOptions);
/Users/diego/Projects/Node Modules/v/node_modules/ws/lib/WebSocket.js:79 - initAsClient.apply(this, [address, protocols, options]);
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/transports/websocket.js:111 - this.ws = this.usingBrowserWebSocket ? new WebSocket(uri) : new WebSocket(uri, protocols, opts);
# Timer
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/socket.js:493 - self.pingTimeoutTimer = setTimeout(function () {
/Users/diego/Projects/Node Modules/v/node_modules/component-emitter/index.js:133 - callbacks[i].apply(this, args);
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/socket.js:432 - this.emit('heartbeat');
# Timer
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/socket.js:509 - self.pingIntervalTimer = setTimeout(function () {
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/socket.js:440 - this.setPing();
/Users/diego/Projects/Node Modules/v/node_modules/engine.io-client/lib/socket.js:268 - self.onPacket(packet);
Related:
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
socket.close() keeps process open.
Steps to reproduce (if the current behaviour is a bug)
close the socket and receive close event. The close is timed out 10 seconds.
At first I thought it could be because of uws, but I switched to ws and the same results happens.
Expected behaviour
close the socket, clear intervals, exit
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
With why-is-node-running:
Related: