We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 960679f commit d100a15Copy full SHA for d100a15
lib/core/Context.js
@@ -207,7 +207,7 @@ class Context extends EventEmitter {
207
});
208
209
this.outgoingSocket.on(kUpstreamClosed, (code, msg) => {
210
- this.incomingSocket.close();
+ this.incomingSocket.close(code, msg);
211
this.emit(kCleanup, this.connectionId);
212
logger.info(
213
`${OUTGOING} [${this.connectionId}] [CLOSE] - Socket closed with ${code} and ${msg}`
lib/core/IncomingWebSocket.js
@@ -115,8 +115,9 @@ class IncomingWebSocket extends EventEmitter {
115
/**
116
* Closes the socket connection.
117
*/
118
- close() {
+ close(code, msg) {
119
this.teardown = true;
120
+ this.socket.close(code, msg);
121
this.socket.terminate();
122
}
123
0 commit comments