signalR JavaScript客户端似乎在iPad休眠后重新连接,但似乎没有收到消息。
我们在服务器上安装了以下Nuget包/版本的signalR。我们还在Web客户端中使用相同版本的signalR JS客户端:
<package id="Microsoft.AspNet.SignalR" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.JS" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.1" targetFramework="net45" />
这些是重现的步骤:
1)我们在用户登录时在Web客户端启动signalR连接。
2)iPad收到通知。
3)让Web客户端闲置,让iPad休眠。
4)大约5分钟后尝试使用Web客户端。根据我们的应用程序服务器日志和signalR服务器跟踪日志信号R重新连接但Web客户端没有收到任何消息。
我们使用此处的说明启用signalR服务器跟踪: http://www.asp.net/signalr/overview/testing-and-debugging/enabling-signalr-tracing
以下是整个传输日志:
fa47e685-528b-46fc-ae56-4dc647065905是初始连接。
a102e5ec-7bfd-449a-93d5-671cfd2bb19e是新连接。
如果您需要更多信息,请与我们联系。
SignalR.Transports.TransportHeartBeat Information: 0 : Connection 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is New.
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.TransportHeartBeat Information: 0 : Connection 5b1d35aa-0d65-45f1-b681-1d7b04569162 is New.
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : 3ebca988-ef0b-49a1-b9f1-7934ea64f176 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection 3ebca988-ef0b-49a1-b9f1-7934ea64f176
SignalR.Transports.ServerSentEventsTransport Information: 0 : Abort(3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.ServerSentEventsTransport Information: 0 : End(3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : Cancel(3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (3ebca988-ef0b-49a1-b9f1-7934ea64f176)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Information: 0 : Connection fa47e685-528b-46fc-ae56-4dc647065905 is New.
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.ServerSentEventsTransport Information: 0 : Abort(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection 5b1d35aa-0d65-45f1-b681-1d7b04569162
SignalR.Transports.ServerSentEventsTransport Information: 0 : End(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (5b1d35aa-0d65-45f1-b681-1d7b04569162)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Verbose: 0 : fa47e685-528b-46fc-ae56-4dc647065905 is dead
SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection fa47e685-528b-46fc-ae56-4dc647065905
SignalR.Transports.ServerSentEventsTransport Information: 0 : Abort(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Information: 0 : End(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : Cancel(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Verbose: 0 : DrainWrites(fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.ServerSentEventsTransport Information: 0 : CompleteRequest (fa47e685-528b-46fc-ae56-4dc647065905)
SignalR.Transports.TransportHeartBeat Information: 0 : Connection a102e5ec-7bfd-449a-93d5-671cfd2bb19e is New.
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
SignalR.Transports.TransportHeartBeat Verbose: 0 : KeepAlive(a102e5ec-7bfd-449a-93d5-671cfd2bb19e)
答案 0 :(得分:0)
如果客户端进入休眠状态并断开连接,您将无法使用相同的connectionID继续连接到该客户端,则它们将具有新的connectionID,您必须将新的connectionID与该用户关联。