Fix OnError getting called in wrong cases in .NET client.
- Fix other case where disconnect token is tripped and OnError is still called.

#1397
Merge branch 'release' into dev