Add error logging to flush

This commit is contained in:
Noah Laptop 2020-05-22 08:59:42 -07:00
parent e9d418fbb1
commit 159267684a

View file

@ -182,7 +182,14 @@ int SSLClient::peek() {
/* see SSLClient.h */ /* see SSLClient.h */
void SSLClient::flush() { void SSLClient::flush() {
if (m_write_idx > 0) if (m_write_idx > 0)
if(m_run_until(BR_SSL_RECVAPP) < 0) m_error("Could not flush write buffer!", __func__); if(m_run_until(BR_SSL_RECVAPP) < 0) {
m_error("Could not flush write buffer!", __func__);
int error = br_ssl_engine_last_error(&m_sslctx.eng);
if(error != BR_ERR_OK)
m_print_br_error(error, SSL_ERROR);
if (getWriteError())
m_print_ssl_error(getWriteError(), SSL_ERROR);
}
} }
/* see SSLClient.h */ /* see SSLClient.h */