SignalR/SignalR — pull request #353 by paulduran (2012-04-30 13:47:27+00:00)
Title: unbind onstart event after calling it

In my app, I have the need to stop the connection hub after my long running operation has completed, and possibly start it up again later.

problem is...

* i call $.connection.hub.start({}, mycallback) , it calls my callback
* then i call$.connection.hub.stop() to shut it down
* but then the next time i call $.connection.hub.start({}, mycallback) , it calls it twice... then 3 times etc

I found that it's not unbinding the onstart event so it is calling the old event handler(s) along with the new one that is passed into the start method.

This change mimics the way that it is done in the onStarting code.