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 109a59c commit ea9e5edCopy full SHA for ea9e5ed
lib/socket.io/transports/websocket.js
@@ -78,15 +78,14 @@ WebSocket.prototype._onConnect = function(req, socket){
78
79
try {
80
this.connection.write(headers.concat('', '').join('\r\n'));
81
+ this.connection.setTimeout(0);
82
+ this.connection.setNoDelay(true);
83
+ this.connection.setEncoding('utf-8');
84
} catch(e){
85
this._onClose();
86
return;
87
}
88
- this.connection.setTimeout(0);
- this.connection.setNoDelay(true);
- this.connection.setEncoding('utf-8');
89
-
90
if (this.waitingForNonce) {
91
// Since we will be receiving the binary nonce through the normal HTTP
92
// data event, set the connection to 'binary' temporarily
0 commit comments