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 dce3468 commit f3271f6
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 f3271f6

Please sign in to comment.