At connect time, I map the clientID to other client and subscription info which I build in a static variable. This works fine until the app pool recycles or I recompile and then I lose my mappings.
Client connections persist after the app pool recycle, but I am not seeing anything in either the OnConnectAsync() or OnReceivedAsync() methods.
I see in Firebug that a new POST is being submitted by my clients every 4 minutes. Is there some SignalR event that I can override to capture the incoming POST and rebuild my client mapping for the current persistent connections?
Thanks.
Make sure you're using SignalR 0.4. You can handle OnReconnectedAsync.
https://github.com/SignalR/SignalR/wiki/PersistentConnection
DISCLAIMER: If you store your application state in static variables it will never be able to scale out on a farm (but maybe you don't care).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With