From e9d418fbb100603bee4e738869996a2f0aef837f Mon Sep 17 00:00:00 2001 From: Noah Laptop Date: Fri, 22 May 2020 08:54:17 -0700 Subject: [PATCH] Add flush after write to prevent buffering in base client --- src/SSLClient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SSLClient.cpp b/src/SSLClient.cpp index f1215b0..eab2dc4 100644 --- a/src/SSLClient.cpp +++ b/src/SSLClient.cpp @@ -465,6 +465,7 @@ unsigned SSLClient::m_update_engine() { buf = br_ssl_engine_sendrec_buf(&m_sslctx.eng, &len); wlen = get_arduino_client().write(buf, len); + get_arduino_client().flush(); if (wlen <= 0) { // if the arduino client encountered an error if (get_arduino_client().getWriteError() || !get_arduino_client().connected()) {