signalR hub中的并发连接

时间:2015-03-12 06:02:19

标签: angularjs chat signalr-hub

我用角度和信号R 2进行聊天应用。

当我尝试在同一浏览器(Chrome)中同时连接超过5个用户的应用程序时,我遇到了问题。

我在Chrome控制台的第六个连接中看到下一个文字:

[17:14:09 GMT+0200 (GTB Standard Time)] SignalR: Client subscribed to hub 'chat'.
jquery.signalR-2.0.2.js:76 [17:14:09 GMT+0200 (GTB Standard Time)] SignalR: Negotiating with '/signalr/negotiate?connectionData=%5B%7B%22name%22%3A%22chat%22%7D%5D&clientProtocol=1.3'.
jquery.signalR-2.0.2.js:76 [17:14:09 GMT+0200 (GTB Standard Time)] SignalR: Attempting to connect to SSE endpoint 'http://localhost:49386/signalr/connect?transport=serverSentEvents&connectio…Q13E%2Fb5FgfyojlL&connectionData=%5B%7B%22name%22%3A%22chat%22%7D%5D&tid=3'.
jquery.signalR-2.0.2.js:76 [17:14:09 GMT+0200 (GTB Standard Time)] SignalR: EventSource connected.
jquery.signalR-2.0.2.js:76 [17:14:09 GMT+0200 (GTB Standard Time)] SignalR: Now monitoring keep alive with a warning timeout of 13333.333333333332 and a connection lost timeout of 20000.
jquery.signalR-2.0.2.js:76 [17:14:12 GMT+0200 (GTB Standard Time)] SignalR: Invoking chat.LoginClient

它等待我关闭打开连接的标签。之后,它执行chat.LoginClient,但System.Threading.Tasks.Task OnDisconnected()没有为关闭浏览器选项卡的用户触发。

1 个答案:

答案 0 :(得分:0)