From 0b293bb0d1c570acd39e994f5131f7120c2455f1 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Mon, 7 Mar 2022 13:35:06 +0000 Subject: [PATCH] Must check return value from http `connect()` --- Sming/Components/Network/src/Network/WebsocketClient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;