You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is an upgrade Request with an invalid sid the current implementation closes the connection immediatly. Which cause an error on nginx ("upstream prematurely closed connection while reading response header from upstream"). If I comment out the socket.end() it returns a 400 Header, which I expect. I have other failuers with the same error, but did not find yet the cause.
Nginx Proxy Headers are set correctly.
Server.prototype.handleUpgrade = function(req, socket, upgradeHead){
this.prepare(req);
var self = this;
this.verify(req, true, function(err, success) {
//if (!success) {
// socket.end();
// return;
//}
var head = new Buffer(upgradeHead.length);
upgradeHead.copy(head);
upgradeHead = null;
// delegate to ws
self.ws.handleUpgrade(req, socket, head, function(conn){
self.onWebSocket(req, conn);
});
});
};