问题
$.connection.myHubName.client.disconnect(function () {
$.connection.hub.start();
});
on hub.start(); server is started but still it working properly
回答1:
The correct method is hanging off the hub connection itself not the hub (so not the client object).
$.connection.hub.disconnected(function () {
console.log('We are currently experiencing difficulties with the connection.')
});
来源:https://stackoverflow.com/questions/47504489/signalr-not-working-when-system-is-ideal-for-some-time