prevent conflict with SSLClient errors and common other client write errors

This commit is contained in:
Noah Laptop 2019-11-11 15:02:37 -08:00
parent 957e09c3d3
commit 58a551aa38
2 changed files with 6 additions and 7 deletions

View file

@ -109,7 +109,6 @@ int SSLClient::connect(const char *host, uint16_t port) {
m_error("Cannot have two connections at the same time! Please create another SSLClient instance.", func_name);
return -1;
}
m_info("Client not connected, continuing...", func_name);
// reset indexs for saftey
m_write_idx = 0;
// first, if we have a session, check if we're trying to resolve the same host

View file

@ -45,17 +45,17 @@ public:
enum Error {
SSL_OK = 0,
/** The underlying client failed to connect, probably not an issue with SSL */
SSL_CLIENT_CONNECT_FAIL,
SSL_CLIENT_CONNECT_FAIL = 2,
/** BearSSL failed to complete the SSL handshake, check logs for bear ssl error output */
SSL_BR_CONNECT_FAIL,
SSL_BR_CONNECT_FAIL = 3,
/** The underlying client failed to write a payload, probably not an issue with SSL */
SSL_CLIENT_WRTIE_ERROR,
SSL_CLIENT_WRTIE_ERROR = 4,
/** An internal error occurred with BearSSL, check logs for diagnosis. */
SSL_BR_WRITE_ERROR,
SSL_BR_WRITE_ERROR = 5,
/** An internal error occurred with SSLClient, and you probably need to submit an issue on Github. */
SSL_INTERNAL_ERROR,
SSL_INTERNAL_ERROR = 6,
/** SSLClient detected that there was not enough memory (>8000 bytes) to continue. */
SSL_OUT_OF_MEMORY
SSL_OUT_OF_MEMORY = 7
};
/**