Skip to content

Commit

Permalink
Catch exceptions when checking if the request is a websocket request.
Browse files Browse the repository at this point in the history
Fixes #496
  • Loading branch information
davidfowl committed Jul 1, 2012
1 parent 0a44575 commit 77ef3df
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions SignalR.Hosting.AspNet/AspNetResponse.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ public bool IsClientConnected
get get
{ {
#if NET45 #if NET45
// Return true for websocket requests since connectivity is handled by SignalR's transport try
if (_context.IsWebSocketRequest) {
// 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 #endif
try try
Expand Down

0 comments on commit 77ef3df

Please sign in to comment.