diff --git a/Sming/Components/Network/src/Network/WebsocketClient.cpp b/Sming/Components/Network/src/Network/WebsocketClient.cpp index 0fe35b640c..ab802141fb 100644 --- a/Sming/Components/Network/src/Network/WebsocketClient.cpp +++ b/Sming/Components/Network/src/Network/WebsocketClient.cpp @@ -43,7 +43,9 @@ bool WebsocketClient::connect(const Url& url) } httpConnection->setSslInitHandler(sslInitHandler); - httpConnection->connect(uri.Host, uri.getPort(), useSsl); + if(!httpConnection->connect(uri.Host, uri.getPort(), useSsl)) { + return false; + } state = State::Ready;