SignalR not working when system is ideal for some time

夙愿已清 提交于 2019-12-02 16:38:30

问题


$.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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!