Skip to content

Commit

Permalink
Changed initialConfigurationClient
Browse files Browse the repository at this point in the history
Separated io.connect() from socket.on('connect', ...) and others as
suggested by
socketio/socket.io#430 (comment) 
I have a feeling this isn't the whole problem but worth a shot.

This is a relatively old thread and there are a few references to
suggested patches. Seems like this reconnect issue is something people
have been struggling with for a while... 

I have a feeling its some subtlety in our code rather than an issue with
the api.
  • Loading branch information
ambarket committed Feb 22, 2015
1 parent 2510c82 commit 5088a6e
Showing 1 changed file with 10 additions and 2 deletions.
@@ -1,6 +1,14 @@
// Listen for notifications of the status of the initial configuration.
var socketIO = io.connect()
.on('progress_update', function(progress) {
var socketIO = io.connect();

// Separated io.connect() from socket.on('connect', ...) and others as suggested by
// https://github.com/Automattic/socket.io/issues/430#issuecomment-7261120
// I have a feeling this isn't the whole problem but worth a shot.
socket.on('connect', function() {
console.log('User connected!');
})

socket.on('progress_update', function(progress) {
$('#progress').val(progress);
})
.on('config_success', function(data) {
Expand Down

0 comments on commit 5088a6e

Please sign in to comment.