From 2565d29ed438d82bf3ef7f69e4bfbd22da51f3d1 Mon Sep 17 00:00:00 2001 From: mtanana Date: Wed, 4 Oct 2017 07:33:47 -0600 Subject: [PATCH 1/3] Update WakeUp.cs Caught an exception that was probably caused by multi threading? Was crashing my system before --- ZWaveLib/CommandClasses/WakeUp.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ZWaveLib/CommandClasses/WakeUp.cs b/ZWaveLib/CommandClasses/WakeUp.cs index f49198d..bf40c92 100644 --- a/ZWaveLib/CommandClasses/WakeUp.cs +++ b/ZWaveLib/CommandClasses/WakeUp.cs @@ -131,7 +131,11 @@ public static void ResendOnWakeUp(ZWaveNode node, byte[] msg) if (queuedCommand.SequenceEqual(command)) { Utility.logger.Trace("Removing old message {0}", BitConverter.ToString(wakeUpResendQueue[i])); - wakeUpResendQueue.RemoveAt(i); + try{ + wakeUpResendQueue.RemoveAt(i); + }catch(Exception e){ + Utility.logger.Trace("Error Removing from Wakeup Queue (but caught)"); + } } } Utility.logger.Trace("Adding message {0}", BitConverter.ToString(msg)); From ab3ae4cf8dc073b82a14a1babfd87c6f4479a12f Mon Sep 17 00:00:00 2001 From: Generoso Martello Date: Mon, 24 Sep 2018 14:17:57 +0200 Subject: [PATCH 2/3] Update WakeUp.cs --- ZWaveLib/CommandClasses/WakeUp.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ZWaveLib/CommandClasses/WakeUp.cs b/ZWaveLib/CommandClasses/WakeUp.cs index bf40c92..d47b9ff 100644 --- a/ZWaveLib/CommandClasses/WakeUp.cs +++ b/ZWaveLib/CommandClasses/WakeUp.cs @@ -131,10 +131,13 @@ public static void ResendOnWakeUp(ZWaveNode node, byte[] msg) if (queuedCommand.SequenceEqual(command)) { Utility.logger.Trace("Removing old message {0}", BitConverter.ToString(wakeUpResendQueue[i])); - try{ + try + { wakeUpResendQueue.RemoveAt(i); - }catch(Exception e){ - Utility.logger.Trace("Error Removing from Wakeup Queue (but caught)"); + } + catch (Exception e) + { + Utility.logger.Warning("Error removing message from WakeUp queue: {0}", e.Message); } } } From 0e9223fc499009a8d84f63e4637a5cacada3a663 Mon Sep 17 00:00:00 2001 From: Generoso Martello Date: Mon, 24 Sep 2018 14:20:47 +0200 Subject: [PATCH 3/3] Update WakeUp.cs --- ZWaveLib/CommandClasses/WakeUp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZWaveLib/CommandClasses/WakeUp.cs b/ZWaveLib/CommandClasses/WakeUp.cs index d47b9ff..6597590 100644 --- a/ZWaveLib/CommandClasses/WakeUp.cs +++ b/ZWaveLib/CommandClasses/WakeUp.cs @@ -137,7 +137,7 @@ public static void ResendOnWakeUp(ZWaveNode node, byte[] msg) } catch (Exception e) { - Utility.logger.Warning("Error removing message from WakeUp queue: {0}", e.Message); + Utility.logger.Warn("Error removing message from WakeUp queue: {0}", e.Message); } } }