mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-02-04 03:14:07 +01:00
[somfytahoma] Call createHttpClient with a SslContextFactory parameter (#14467)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
dbfdcfb96e
commit
cb160bdf63
@ -73,6 +73,7 @@ import org.openhab.core.thing.ThingStatusDetail;
|
|||||||
import org.openhab.core.thing.ThingStatusInfo;
|
import org.openhab.core.thing.ThingStatusInfo;
|
||||||
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;
|
||||||
@ -184,10 +185,11 @@ public class SomfyTahomaBridgeHandler extends BaseBridgeHandler {
|
|||||||
|
|
||||||
private void createHttpClient() {
|
private void createHttpClient() {
|
||||||
// let's create the right http client
|
// let's create the right http client
|
||||||
|
String clientName = ThingWebClientUtil.buildWebClientConsumerName(thing.getUID(), null);
|
||||||
if (thingConfig.isDevMode()) {
|
if (thingConfig.isDevMode()) {
|
||||||
this.httpClient = new HttpClient(new SslContextFactory.Client(true));
|
this.httpClient = httpClientFactory.createHttpClient(clientName, new SslContextFactory.Client(true));
|
||||||
} else {
|
} else {
|
||||||
this.httpClient = httpClientFactory.createHttpClient("somfy_" + thing.getUID().getId());
|
this.httpClient = httpClientFactory.createHttpClient(clientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user