Browse Source

potential issue fix, ret was definitely not the right var but not sure if state is

Odilitime 5 years ago
parent
commit
7ad3723d45
  1. 2
      src/networking/HTTPSRequest.cpp

2
src/networking/HTTPSRequest.cpp

@ -85,7 +85,7 @@ bool HTTPSRequest::sendRequest(std::function<void(const HTTPResponse&)> response @@ -85,7 +85,7 @@ bool HTTPSRequest::sendRequest(std::function<void(const HTTPResponse&)> response
std::cout << "HTTPS Request: " << request << std::endl;
while( ( state = mbedtls_ssl_write( &ssl, reinterpret_cast<const unsigned char*>(request.c_str()), request.length() ) ) <= 0 ){
if( state != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ){
if( state != MBEDTLS_ERR_SSL_WANT_READ && state != MBEDTLS_ERR_SSL_WANT_WRITE ){
printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", state );
return false;
}

Loading…
Cancel
Save