Skip to content

Commit

Permalink
[dsmr] Set Thread name and daemon state (openhab#8325)
Browse files Browse the repository at this point in the history
Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Signed-off-by: Clayton Tabone <[email protected]>
  • Loading branch information
Hilbrand authored and taboneclayton committed Aug 23, 2020
1 parent c748337 commit dc4e142
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ public void initialize() {
this.dsmrDevice = dsmrDevice; // otherwise Eclipse will give a null pointer error on the next line :-(
dsmrDeviceRunnable = new DSMRDeviceRunnable(dsmrDevice, this);
dsmrDeviceThread = new Thread(dsmrDeviceRunnable);
dsmrDeviceThread.setName("OH-binding-" + getThing().getUID());
dsmrDeviceThread.setDaemon(true);
dsmrDeviceThread.start();
watchdog = scheduler.scheduleWithFixedDelay(this::alive, receivedTimeoutNanos, receivedTimeoutNanos,
TimeUnit.NANOSECONDS);
Expand Down

0 comments on commit dc4e142

Please sign in to comment.