switch loading of config file to synchronous to prevent socket server from opening pre-emptively

v1.18.x
psychobunny 12 years ago
parent 1d35f369d9
commit 5b64500da3

@ -3,13 +3,18 @@ var socket,
(function() {
$.get('config.json?v=' + new Date().getTime(), function(data) {
config = data;
socket = io.connect('http://' + config.socket.address + config.socket.port? ':' + config.socket.port : '');
$.ajax({
url: 'config.json?v=' + new Date().getTime(),
success: function(data) {
config = data;
socket = io.connect('http://' + config.socket.address + config.socket.port? ':' + config.socket.port : '');
socket.on('event:connect', function(data) {
socket.on('event:connect', function(data) {
});
},
async: false
});
});

Loading…
Cancel
Save