Currently, CallR will try to be smart about disconnecting if the hub was disconnected before requests were flushed. This can cause race conditions if the connection isn't set up before the first requests are made.
This can be fixed already by wrapping initialization in code that looks like:
hub.connect().then(function() {
/* Call init function here */
});
However, that can become cumbersome if you simply do not want this feature. I'm going to add an option to the global CallR options so that this feature can be turned on and off.
Currently, CallR will try to be smart about disconnecting if the hub was disconnected before requests were flushed. This can cause race conditions if the connection isn't set up before the first requests are made.
This can be fixed already by wrapping initialization in code that looks like:
However, that can become cumbersome if you simply do not want this feature. I'm going to add an option to the global CallR options so that this feature can be turned on and off.