Skip to content

Commit

Permalink
Must check return value from http connect()
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 authored and mikee47 committed Mar 25, 2024
1 parent d234181 commit 0b293bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sming/Components/Network/src/Network/WebsocketClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0b293bb

Please sign in to comment.