@@ -849,6 +849,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
849849 WOLFSSL_ASYNC_WHILE_PENDING (ret = wolfSSL_write (ssl , tx_buffer , len ),
850850 ret <= 0 );
851851 if (ret != len ) {
852+ err = wolfSSL_get_error (ssl , 0 );
852853 LOG_ERROR ("SSL_write bench error %d!\n" , err );
853854 if (!exitWithRet )
854855 err_sys ("SSL_write failed" );
@@ -912,7 +913,11 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
912913 XFREE (rx_buffer , NULL , DYNAMIC_TYPE_TMP_BUFFER );
913914 }
914915 else {
915- err_sys ("wolfSSL_connect failed" );
916+ err = wolfSSL_get_error (ssl , 0 );
917+ LOG_ERROR ("wolfSSL_connect error %d, %s\n" , err ,
918+ wolfSSL_ERR_error_string ((unsigned long )err , NULL ));
919+ if (!exitWithRet )
920+ err_sys ("wolfSSL_connect failed" );
916921 }
917922
918923 wolfSSL_shutdown (ssl );
@@ -4884,6 +4889,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
48844889 ret = NonBlockingSSL_Connect (sslResume ); /* will keep retrying on timeout */
48854890#endif
48864891 if (ret != WOLFSSL_SUCCESS ) {
4892+ err = wolfSSL_get_error (sslResume , 0 );
48874893 LOG_ERROR ("wolfSSL_connect resume error %d, %s\n" , err ,
48884894 wolfSSL_ERR_error_string ((unsigned long )err , buffer ));
48894895 wolfSSL_free (sslResume ); sslResume = NULL ;
0 commit comments