Skip to content

Commit

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

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored Jul 8, 2020
1 parent 86fab7d commit b315a5e
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 b315a5e

Please sign in to comment.