Skip to content

Commit 8bdb84c

Browse files
committed
Merge pull request #151 from calband/durand__fixClientStartupError
Prevent Trivial Error Reports
2 parents 2d7db0a + 0c91e89 commit 8bdb84c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/single_instance_ipc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ void CCAppClient::Disconnect()
192192

193193
bool CCAppClient::Connect(const wxString& host, const wxString& service, const wxString& topic)
194194
{
195+
auto oldLogLevel = wxLog::GetLogLevel();
196+
wxLog::SetLogLevel(wxLOG_FatalError); //Make sure that we don't throw errors to the user if the connection fails; we expect connections to fail when we are testing whether or not there is a server, and the user shouldn't be informed when we cannot find a server
195197
mConnection = (CCAppClientConnection*)MakeConnection(host, service, topic);
198+
wxLog::SetLogLevel(oldLogLevel);
196199
return IsConnected();
197200
}
198201

0 commit comments

Comments
 (0)