This reverts commit 654bfb4.
…isconnected" This reverts commit e1b1de6.
…e server AspNetWebsocket uncoditionally throws a NotSupportedException from the Dispose() method, so #ifdefing the invocation so that we only call Dispose on the client.
- If the WebSocket transport failed to connect, an uncaught type error would be thrown from the modified
- Previously, when I tried installing the client package into a universal app, only the phone project got the additional dll with WebSocket support.
… transport If an exception happened while reading a message using the websocket store transport we would not handle. As a result it would be bubbled up and would crash the user's app. The user have no way of catching this exception. The fix is to catch exceptions and report them to the user using the IConnection.Error and to close the websocket to enable reconnect logic. Workitem #3313
- This test proved unreliable with long polling which would not always go into the reconnecting state if the restart was in between polls - The restarting AppDomain could cause other tests running concurrently locally or in TestSwarm to fail - The JS test is replaced by an equivalent .NET client functional test
- In the event of any transport error prior to the init message, the transport should immediately stop and allow the connection to fall back to another transport. - In the event of any transport error during the start request, the entire connection should immediately be stopped
- DefaultDependencyResolver will now no longer retain instances to IDisposables that implement the special marker interface IUntrackedDisposable. #3208
Since we serialize the invocations of Received callbacks in the .NET client, there is a real risk of deadlocks resulting from one callback blocking waiting on another callback to execute. This commit introduces a TaskQueueMonitor used exclusively by the .NET client to try to detect callbacks that are running long and notify the user using Connection.OnError that a callback may be deadlocked. The amount of time a callback may execute before an error is raised can be configured using Connection.DeadlockErrorTimeout. The default timeout is 10 seconds. #3167
Previously the store `WebSocketTransport` would accept `Send` requests when the transport was reconnecting. The change to invoke `OnError()` and throw an exception if this happens - similarly to what we do in the .NET Client.
The store WebSocketTransport did not respect the disconnect token. Now if the disconnect cancellation token is cancelled we will not try to reconnect if the websocket gets closed and if we are already trying to reconnect we will stop doing this. Note that we don't need to register to the cancellation event since the disconnect cancellation token is cancelled only in the `Connection.Disconnect()` method which also disposes the transport which will take care of the all needed clean up. Also fixed a race in the WebSocketTransport.Dispose method which might lead to unwanted reconnection attempts. Workitem #3189