Skip to content

Commit 49b4d21

Browse files
committed
fix: ClientSecure.available() fix for connection closed by remote socket
1 parent cbf1e94 commit 49b4d21

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: libraries/NetworkClientSecure/src/NetworkClientSecure.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,11 @@ int NetworkClientSecure::available() {
305305
res = data_to_read(sslclient.get());
306306

307307
if (res < 0 && !_stillinPlainStart) {
308-
log_e("Closing connection on failed available check");
308+
if (res != -30848) {
309+
log_e("Closing connection on failed available check");
310+
}
309311
stop();
310-
return peeked ? peeked : res;
312+
return peeked;
311313
}
312314
return res + peeked;
313315
}

0 commit comments

Comments
 (0)