Be careful about OnDisconnected when using SignalR
If you are using SignalR for your real-time communication, be careful about OnDisconnected virtual method, because there are two different implementations.
1 - It is fired only when connection was closed gracefully (not every time!):
public virtual Task OnDisconnected()
2 - It is fired every time when connection closes:
public virtual Task OnDisconnected(bool stopCalled)
So I recommend to use second version.
Written by Ezeki Zibzibadze
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#