tejacques / callr

A SignalR Utility Library (js and csharp)
MIT License
7 stars 0 forks source link

Make smart disconnection configurable on flushing request queue #8

Closed tejacques closed 10 years ago

tejacques commented 10 years ago

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.