Skip to content

Commit

Permalink
[deconz] Adjust thread name for web socket client (#14343)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored Feb 19, 2023
1 parent 8c09334 commit b0eaa9e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseBridgeHandler;
import org.openhab.core.thing.binding.ThingHandlerService;
import org.openhab.core.thing.util.ThingWebClientUtil;
import org.openhab.core.types.Command;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -86,12 +87,7 @@ public DeconzBridgeHandler(Bridge thing, WebSocketFactory webSocketFactory, Asyn
super(thing);
this.http = http;
this.gson = gson;
String websocketID = thing.getUID().getAsString().replace(':', '-');
if (websocketID.length() < 4) {
websocketID = "openHAB-deconz-" + websocketID;
} else if (websocketID.length() > 20) {
websocketID = websocketID.substring(websocketID.length() - 20);
}
String websocketID = ThingWebClientUtil.buildWebClientConsumerName(thing.getUID(), null);
this.websocket = new WebSocketConnection(this, webSocketFactory.createWebSocketClient(websocketID), gson);
}

Expand Down

0 comments on commit b0eaa9e

Please sign in to comment.