Skip to content

Commit 3b61e4d

Browse files
committed
redundant
1 parent fe045d8 commit 3b61e4d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,8 @@ bool WiFiClientSecureCtx::stop(unsigned int maxWaitMs) {
201201
}
202202

203203
bool WiFiClientSecureCtx::flush(unsigned int maxWaitMs) {
204-
auto savedTimeout = _timeout;
205-
_timeout = maxWaitMs;
206-
207-
auto savedHandshake = _handshakeTimeout;
208-
_handshakeTimeout = maxWaitMs;
209-
210-
auto result = _run_until(BR_SSL_SENDAPP);
211-
_timeout = savedTimeout;
212-
_handshakeTimeout = savedHandshake;
213-
214-
if (result != -1 && ctx_present()) {
204+
const auto result = _run_until(BR_SSL_SENDAPP);
205+
if (result != -1 && _engineConnected()) {
215206
return WiFiClient::flush(maxWaitMs);
216207
}
217208

0 commit comments

Comments
 (0)