For me, i think i would just use the Context.ConnectionAborted.ThrowIfCancellationRequested()
, put it in the first line of StartTesting
method, because the Context
holds data in every incoming request, if user stop connecting to the hub then it will automatically throw exception. You could try this.