0
I’ve got a nasty J server set up this way:
var express = require('express'); // CHAMADA DA API EXPRESS
var app = express();
var server = require('http').createServer(app); // CHAMADA DO HTTP
var io = require('socket.io').listen(server); // CHAMADA DO SOCKET
var script = {}; // OBJETO
var red, blue, reset; // CORES NO CONSOLE
red = '\u001b[1;31m'; // VERMELHO
blue = '\u001b[36m'; // AZUL
reset = '\u001b[0m'; // PADRAO
app.listen(8088,function(){ // OUVIR NA PORTA 8088
console.log('Express server listening on port 8088 in %s mode', app.get('env'));
});
io.sockets.on('connection', function (socket) {/*...*/});
It’s in production running normally on almost all the machines that access it, but some machines get this xhr-Polling charging all the time and it just doesn’t work. I have no idea if this is a problem on the server or on client machines, since this error appears only on a few clients.
I did it in the lab and I got this log:
C:\Program Files (x86)\nodejs>node.exe socketServer.js
info - socket.io started
Server ouvindo a porta 8088
Express server listening on port 8088 in development mode
debug - client authorized
info - handshake authorized EjVRi0UO02fwVUQZah80
debug - setting request GET /socket.io/1/websocket/EjVRi0UO02fwVUQZah80
debug - set heartbeat interval for client EjVRi0UO02fwVUQZah80
debug - client authorized for
debug - websocket writing 1::
Conexao no Socket ok
debug - setting request GET /socket.io/1/xhr-polling/EjVRi0UO02fwVUQZah80?t=1438267327637
debug - setting poll timeout
debug - discarding transport
debug - cleared heartbeat interval for client EjVRi0UO02fwVUQZah80
debug - setting request GET /socket.io/1/jsonp-polling/EjVRi0UO02fwVUQZah80?t=1438267337643&i=0
debug - setting poll timeout
debug - discarding transport
debug - clearing poll timeout
debug - clearing poll timeout
debug - jsonppolling writing io.j[0]("8::");
debug - set close timeout for client EjVRi0UO02fwVUQZah80
debug - jsonppolling closed due to exceeded duration
debug - setting request GET /socket.io/1/jsonp-polling/EjVRi0UO02fwVUQZah80?t=1438267357677&i=0
debug - setting poll timeout
debug - discarding transport
debug - cleared close timeout for client EjVRi0UO02fwVUQZah80
debug - clearing poll timeout
debug - jsonppolling writing io.j[0]("8::");
debug - set close timeout for client EjVRi0UO02fwVUQZah80
debug - jsonppolling closed due to exceeded duration
debug - setting request GET /socket.io/1/jsonp-polling/EjVRi0UO02fwVUQZah80?t=1438267377699&i=0
debug - setting poll timeout
debug - discarding transport
debug - cleared close timeout for client EjVRi0UO02fwVUQZah80
Are there any standards on these machines? operating system, etc...
– Sergio
At first it has the same settings that I use on my machine that works
– SneepS NinjA
I ended up discovering that Avast was blocking, just not how to configure this Avast to allow
– SneepS NinjA