|
|
@ -28,11 +28,17 @@ var socket,
|
|
|
|
socket.socket.connect();
|
|
|
|
socket.socket.connect();
|
|
|
|
}, 200);
|
|
|
|
}, 200);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
socket = io.connect('', {
|
|
|
|
var ioParams = {
|
|
|
|
'max reconnection attempts': config.maxReconnectionAttempts,
|
|
|
|
'max reconnection attempts': config.maxReconnectionAttempts,
|
|
|
|
'reconnection delay': config.reconnectionDelay,
|
|
|
|
'reconnection delay': config.reconnectionDelay,
|
|
|
|
resource: RELATIVE_PATH.length ? RELATIVE_PATH.slice(1) + '/socket.io' : 'socket.io'
|
|
|
|
resource: RELATIVE_PATH.length ? RELATIVE_PATH.slice(1) + '/socket.io' : 'socket.io'
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (utils.isAndroidBrowser) {
|
|
|
|
|
|
|
|
ioParams.transports = ['xhr-polling'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
socket = io.connect('', ioParams);
|
|
|
|
|
|
|
|
|
|
|
|
var reconnecting = false,
|
|
|
|
var reconnecting = false,
|
|
|
|
reconnectEl, reconnectTimer;
|
|
|
|
reconnectEl, reconnectTimer;
|
|
|
|