Skip to content

Commit

Permalink
cut down on spam
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack Piispanen committed Nov 7, 2013
1 parent 384fbaf commit e22798d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion MultiServerChat/MultiServerChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private object RestChat(RestVerbs verbs, IParameterCollection parameters, Secure
return new RestObject();
}

private bool failure = false;
private void OnChat(ServerChatEventArgs args)
{
if (!Config.SendChat)
Expand Down Expand Up @@ -134,10 +135,15 @@ private void OnChat(ServerChatEventArgs args)
var request = (HttpWebRequest)WebRequest.Create(uri);
using (var res = request.GetResponse())
{}
failure = false;
}
catch (Exception)
{
Log.Error("Failed to make request to other server, server is down?");
if (!failure)
{
Log.Error("Failed to make request to other server, server is down?");
failure = true;
}
}
}
}
Expand Down

0 comments on commit e22798d

Please sign in to comment.