From d59faf1f7d70e9c60a510ea805d7883057710e68 Mon Sep 17 00:00:00 2001 From: Noah Laptop Date: Thu, 7 Mar 2019 08:26:41 -0800 Subject: [PATCH] fixed a bug where a write error would persist across sessions --- src/SSLClientImpl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SSLClientImpl.cpp b/src/SSLClientImpl.cpp index 11d4b9c..4778308 100644 --- a/src/SSLClientImpl.cpp +++ b/src/SSLClientImpl.cpp @@ -70,6 +70,9 @@ int SSLClientImpl::connect(const char *host, uint16_t port) { return 0; } m_print("Base ethernet client connected!"); + // clear the write error + setWriteError(SSL_OK); + // start ssl! return m_start_ssl(host); } @@ -254,8 +257,6 @@ int SSLClientImpl::m_start_ssl(const char* host) { } Serial.println(); Serial.println(m_ses_param.cipher_suite, HEX); - // clear the error flag: we've connected! - setWriteError(SSL_OK); return 1; }