Browse Source

Better handle user exceptions

tags/docs-0.9
Brandon Smith 9 years ago
parent
commit
c16cb31782
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/Discord.Net/DiscordWebSocket.cs

+ 5
- 1
src/Discord.Net/DiscordWebSocket.cs View File

@@ -150,7 +150,11 @@ namespace Discord
QueueMessage(new WebSocketCommands.KeepAlive());
_connectWaitOnLogin.Set(); //Pre-Event
}
RaiseGotEvent(msg.Type, msg.Payload as JToken);
try
{
RaiseGotEvent(msg.Type, msg.Payload as JToken);
}
catch { } //Don't allow user exceptions to affect our state
if (msg.Type == "READY")
_connectWaitOnLogin2.Set(); //Post-Event
break;


Loading…
Cancel
Save