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

Commit

Permalink
[Satel] Binding deactivation fix (#5207)
Browse files Browse the repository at this point in the history
  • Loading branch information
druciak authored and 9037568 committed Aug 4, 2017
1 parent 5b27bda commit 3d8834c
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,20 @@ public synchronized void open() {
* Stops communication by disconnecting from the module and stopping all
* background tasks.
*/
public synchronized void close() {
public void close() {
// first we clear watchdog field in the object
CommunicationWatchdog watchdog = null;
if (this.communicationWatchdog != null) {
this.communicationWatchdog.close();
this.communicationWatchdog = null;
synchronized (this) {
if (this.communicationWatchdog != null) {
watchdog = this.communicationWatchdog;
this.communicationWatchdog = null;
}
}
}
// then, if watchdog exists, we close it
if (watchdog != null) {
watchdog.close();
}
}

Expand Down

0 comments on commit 3d8834c

Please sign in to comment.