Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
LIFX binding: Fix #1915 IllegalMonitorStateException may occur when u…
Browse files Browse the repository at this point in the history
…nlocking after sending broadcast packet (#1919)

Signed-off-by: Wouter Born <eclipse@maindrain.net>
  • Loading branch information
wborn authored and kaikreuzer committed Jul 26, 2016
1 parent 09e954e commit 369e42b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ public static void lock() {
public static void unlock() {

for (String key : locks.keySet()) {
timestamps.put(key, System.currentTimeMillis());
locks.get(key).unlock();
if (locks.get(key).isHeldByCurrentThread()) {
timestamps.put(key, System.currentTimeMillis());
locks.get(key).unlock();
}
}

}
Expand Down

0 comments on commit 369e42b

Please sign in to comment.