[deconz] Adjust thread name for web socket client (#14343)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
8c09334943
commit
b0eaa9effc
|
@ -46,6 +46,7 @@ import org.openhab.core.thing.ThingStatusDetail;
|
||||||
import org.openhab.core.thing.ThingTypeUID;
|
import org.openhab.core.thing.ThingTypeUID;
|
||||||
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
||||||
import org.openhab.core.thing.binding.ThingHandlerService;
|
import org.openhab.core.thing.binding.ThingHandlerService;
|
||||||
|
import org.openhab.core.thing.util.ThingWebClientUtil;
|
||||||
import org.openhab.core.types.Command;
|
import org.openhab.core.types.Command;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -86,12 +87,7 @@ public class DeconzBridgeHandler extends BaseBridgeHandler implements WebSocketC
|
||||||
super(thing);
|
super(thing);
|
||||||
this.http = http;
|
this.http = http;
|
||||||
this.gson = gson;
|
this.gson = gson;
|
||||||
String websocketID = thing.getUID().getAsString().replace(':', '-');
|
String websocketID = ThingWebClientUtil.buildWebClientConsumerName(thing.getUID(), null);
|
||||||
if (websocketID.length() < 4) {
|
|
||||||
websocketID = "openHAB-deconz-" + websocketID;
|
|
||||||
} else if (websocketID.length() > 20) {
|
|
||||||
websocketID = websocketID.substring(websocketID.length() - 20);
|
|
||||||
}
|
|
||||||
this.websocket = new WebSocketConnection(this, webSocketFactory.createWebSocketClient(websocketID), gson);
|
this.websocket = new WebSocketConnection(this, webSocketFactory.createWebSocketClient(websocketID), gson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue