Overloading the disconnect function allows you to handle what to do when a user disconnects.
public override Task OnDisconnected(bool stopCalled) { //Your disconnect logic here return base.OnDisconnected(stopCalled); }