Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Catch exceptions when checking if the request is a websocket request.

Fixes #496
  • Loading branch information...
commit 77ef3df4b00975d9706d6c8733ad6f36124ccb87 1 parent 0a44575
@davidfowl davidfowl authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 SignalR.Hosting.AspNet/AspNetResponse.cs
View
13 SignalR.Hosting.AspNet/AspNetResponse.cs
@@ -26,10 +26,17 @@ public bool IsClientConnected
get
{
#if NET45
- // Return true for websocket requests since connectivity is handled by SignalR's transport
- if (_context.IsWebSocketRequest)
+ try
+ {
+ // Return true for websocket requests since connectivity is handled by SignalR's transport
+ if (_context.IsWebSocketRequest)
+ {
+ return true;
+ }
+ }
+ catch
{
- return true;
+ // This fails if the request isn't a websocket request or if we're not in integrated mode
}
#endif
try
Please sign in to comment.
Something went wrong with that request. Please try again.