Skip to content

Commit

Permalink
fix: ClientSecure.available() fix for connection closed by remote socket
Browse files Browse the repository at this point in the history
  • Loading branch information
JAndrassy committed Jun 15, 2024
1 parent cbf1e94 commit 49b4d21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/NetworkClientSecure/src/NetworkClientSecure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,11 @@ int NetworkClientSecure::available() {
res = data_to_read(sslclient.get());

if (res < 0 && !_stillinPlainStart) {
log_e("Closing connection on failed available check");
if (res != -30848) {
log_e("Closing connection on failed available check");
}
stop();
return peeked ? peeked : res;
return peeked;
}
return res + peeked;
}
Expand Down

0 comments on commit 49b4d21

Please sign in to comment.