Skip to content

Commit

Permalink
* NEW [openssl] Update the logs.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <[email protected]>
  • Loading branch information
wanghaEMQ committed Dec 26, 2024
1 parent a09ebae commit 0aa1a25
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/supplemental/tls/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ static int
open_conn_handshake(nng_tls_engine_conn *ec)
{
int rv;
print_trace();
if (ec->ok == 1)
return 0;
rv = SSL_do_handshake(ec->ssl);
Expand Down Expand Up @@ -372,12 +373,13 @@ open_conn_send(nng_tls_engine_conn *ec, const uint8_t *buf, size_t *szp)
memcpy(ec->wnext, wnext + rv, dm);
ec->wnsz = dm;
log_debug("NNG-TLS-CONN-SEND"
"still %d bytes not really be put to kernel", dm);
"written%d remain%d bytes to put to kernel", rv, dm);
nng_free(wnext, 0);
return NNG_EAGAIN;
}
nng_free(wnext, 0);
written2tcp = ec->wntcpsz;
log_debug("writing done%d written2tcp%d", ec->wnsz, written2tcp);
goto end;
} else if (rv == 0 - SSL_ERROR_WANT_READ || rv == 0 - SSL_ERROR_WANT_WRITE) {
trace("end3");
Expand Down Expand Up @@ -436,7 +438,8 @@ open_conn_send(nng_tls_engine_conn *ec, const uint8_t *buf, size_t *szp)
memcpy(ec->wnext, ec->rbuf + rv, dm);
ec->wnsz = dm;
log_debug("NNG-TLS-CONN-SEND"
"still %d bytes not really be put to kernel", dm);
"tcp%d ssl%d written%d remain%dbytes to put to kernel",
written2tcp, read2buf, rv, dm);
// written2tcp += written2ssl; // This may make wnext send after a long time
// So updated way is as following.
// Part of block of data sent failed. The return value size will not
Expand Down

0 comments on commit 0aa1a25

Please sign in to comment.