mirror of https://github.com/icedream/npsharp.git
Only throw errors in reading loop in Debug builds.
parent
96d4e1f778
commit
301281737c
|
@ -570,12 +570,23 @@ namespace NPSharp
|
|||
#endif
|
||||
_log.Debug("Client connected");
|
||||
OnClientConnected(client);
|
||||
#if !DEBUG
|
||||
try
|
||||
#endif
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var msg = client.RPC.Read();
|
||||
if (msg == null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if !DEBUG
|
||||
catch (Exception error)
|
||||
{
|
||||
_log.Error("Error in RPC read loop", error);
|
||||
}
|
||||
#endif
|
||||
_log.Debug("Client disconnected");
|
||||
OnClientDisconnected(client);
|
||||
#if !DEBUG
|
||||
|
|
Loading…
Reference in New Issue