I'm using signalR 2.2.1. When the IIS apppool recycles, if there's an open connection, the client tries forever to reconnect (with the same ConnectionId).
A sample of the SignalR client log (for every reconnect attempt):
SignalR: webSockets reconnecting.
SignalR: Connecting to websocket endpoint 'wss://IP/hub/signalr/reconnect?transport=webSockets&groupsToken=8FWHT%2FO774vZYA7IYz8%2F%2FX9zMLswzG98KhGbM83kK5xh%2BVVbqQPv1wQYQWvzTygSQHj9QsDyoHL1U8eQ1fV18QQQ%2FZqRewQEpU4rkRZRE0CE%2B2oDk9RQghCT%2BxlV0KFcl%2FUpuepwX0E5w4xhSScH%2BFkxFvL4vtPIpwYVzInIaW%2BICRWRHrNfjKm9RLiC3a%2F3jcYi1AUeFBJsDnY%2F9bZBrA%3D%3D&messageId=d-C69C65D6-H%2C0%7CI%2C0%7CJ%2C4%7CK%2C0%7CL%2C0%7CM%2C0&clientProtocol=1.5&connectionToken=%2FivgB%2Bcy%2FE1%2B%2BTFj5eCqTEZNzr%2FVuIzdJQVbUypK1YjrZur80uPbufYxGT%2BDC%2FWhsHXZJgUpkI2IyJ8Y8wnuOEAID%2F9kOnSyllFpCQHDN6VRTdMEaU%2F0Kdh4yX2vqKh%2F&connectionData=%5B%7B%22name%22%3A%22hub%22%7D%5D&tid=0'.
SignalR: Closing the Websocket.
SignalR: Websocket opened.
SignalR: Unclean disconnect from websocket: [no reason given].
I did a workaround - when reconnected callback is being called - to stop and start the connection (just start won't work):
$.connection.hub.reconnected(function() {
console.log("reconnected");
$.connection.hub.stop();
$.connection.hub.start();
});
But then re connection is being handled by me, and I guess that's not a good idea.
Any other ideas?