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