Skip to content

Commit

Permalink
[innogysmarthome] Fix possible resource leak (openhab#8080)
Browse files Browse the repository at this point in the history
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
  • Loading branch information
lolodomo authored and DaanMeijer committed Sep 1, 2020
1 parent b359b01 commit 68cf8f5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ public synchronized void stop() {
session = null;
logger.trace("Stopping websocket ignored - was not running.");
}
if (client != null) {
try {
client.stop();
client.destroy();
} catch (Exception e) {
logger.debug("Stopping websocket failed", e);
}
client = null;
}
}

/**
Expand Down

0 comments on commit 68cf8f5

Please sign in to comment.