SignalR在Chrome上使用服务器发送的事件 [英] SignalR using server-sent event on Chrome

查看:183
本文介绍了SignalR在Chrome上使用服务器发送的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题:

我在Chrome上运行我的代码,注意到SignalR使用html5 服务器发送的事件 onDisconnect()时,直到30秒后才会触发。在 Hub中是否有任何设置可以做到立即响应断开连接事件?

我的观察:

请注意,延迟问题只发生在我刷新页面,而不是当我关闭浏览器。关闭浏览器时, onDisconnect()会立即触发。奇怪的事情@ _ @



版本限制:

我使用SignalR 1.1.3(最新版本2.xx发生了),因为我们公司没有vs2013,我无法使用2.xx与我的电脑上的vs2013 express。



请帮助:)

解决方案

这是一个错误。我们每次浏览新版本浏览器时都会遇到困难,因此我们需要验证该事情是否仍然有效。这是该问题的突出错误 https://github.com/SignalR/SignalR/issues/2719


My Problem:

I am running my code on Chrome, notice that SignalR is using html5 server-sent events as an automatic choice, great. However, when I refresh the page onDisconnect() on server side doesn't fire until 30 seconds later. Is there any settings in the Hub I can do to make it response upon the disconnect event immediately?

My Observation:

Note that delay issue only happens with I refresh page, not when I am closing the browser. The onDisconnect() fires instantly when closing the browser. Strange thing @_@

Version Limitation:

I am using SignalR 1.1.3 (The latest version before 2.x.x happened) because we don't have vs2013 in our company and I couldn't get 2.x.x to work with vs2013 express on my pc anyway.

Please help :)

解决方案

It's a bug. One that we struggle with everytime a new version of a browser comes out we need to verify that thing still work. Here's the outstanding bug for that issue https://github.com/SignalR/SignalR/issues/2719

这篇关于SignalR在Chrome上使用服务器发送的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆