From 1abdb83883abd266cc2ef7f02fe51ecc6843167f Mon Sep 17 00:00:00 2001 From: icedream Date: Fri, 13 Jun 2014 07:31:25 +0200 Subject: [PATCH] Fix reading loop failout --- src/client/NP/NPClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/NP/NPClient.cs b/src/client/NP/NPClient.cs index 78cc750..1156718 100644 --- a/src/client/NP/NPClient.cs +++ b/src/client/NP/NPClient.cs @@ -93,6 +93,11 @@ namespace NPSharp.NP _log.ErrorFormat("Protocol violation: {0}. Disconnect imminent.", error.Message); Disconnect(); } + catch (Exception error) + { + _log.ErrorFormat("Loop error in RPC read: {0}", error.ToString()); + Disconnect(); + } _log.Debug("Now not receiving RPC messages anymore"); }, _cancellationToken);