Skip to content

Commit

Permalink
Revert "[MXCHIP] add log to debug tls free/close"
Browse files Browse the repository at this point in the history
This reverts commit bef89f4.
  • Loading branch information
mxchipwanges committed Mar 26, 2024
1 parent b31ac57 commit 2b61013
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/core/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ static struct {
void
nng_stream_close(nng_stream *s)
{
log_debug("do nng_stream_close %p", s);
s->s_close(s);
}

Expand Down
10 changes: 0 additions & 10 deletions src/supplemental/tls/tls_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ tls_conn_cb(void *arg)
nng_stream *tcp;
int rv;

log_debug("*** tls_conn_cb ***");
if ((rv = nni_aio_result(&conn->conn_aio)) != 0) {
log_debug("*** tls_conn_cb: nni_aio_result err %d ! nng_stream_free %p", rv, &conn->stream);
nni_aio_finish_error(conn->user_aio, rv);
nng_stream_close(&conn->stream);
nng_stream_free(&conn->stream);
Expand All @@ -146,7 +144,6 @@ tls_conn_cb(void *arg)
tcp = nni_aio_get_output(&conn->conn_aio, 0);

if ((rv = tls_start(conn, tcp)) != 0) {
log_debug("*** tls_conn_cb: tls_start err %d ! nng_stream_free %p", rv, &conn->stream);
nni_aio_finish_error(conn->user_aio, rv);
nng_stream_close(&conn->stream);
nng_stream_free(&conn->stream);
Expand Down Expand Up @@ -673,7 +670,6 @@ static void
tls_cancel(nni_aio *aio, void *arg, int rv)
{
tls_conn *conn = arg;
log_debug("*** tls_cancel: conn %p, rv %d", conn, rv);
nni_mtx_lock(&conn->lock);
if (aio == nni_list_first(&conn->recv_queue)) {
nni_aio_abort(&conn->tcp_recv, rv);
Expand Down Expand Up @@ -747,7 +743,6 @@ tls_close(void *arg)
conn->ops.close((void *) (conn + 1));
tls_tcp_error(conn, NNG_ECLOSED);
nni_mtx_unlock(&conn->lock);
log_debug("*** tls_close: conn %p, nng_stream_close tcp %p", conn, conn->tcp);
nng_stream_close(conn->tcp);
}

Expand Down Expand Up @@ -896,9 +891,7 @@ tls_reap(void *arg)
tls_conn *conn = arg;

// Shut it all down first. We should be freed.
log_debug("*** tls_reap: conn %p, conn->tcp %p", conn, conn->tcp);
if (conn->tcp != NULL) {
log_debug("*** tls_reap: nng_stream_close %p", conn->tcp);
nng_stream_close(conn->tcp);
}
nni_aio_stop(&conn->conn_aio);
Expand Down Expand Up @@ -927,7 +920,6 @@ tls_free(void *arg)
{
tls_conn *conn = arg;

log_debug("*** tls_free: conn %p, tcp %p", conn, conn->tcp);
nni_reap(&tls_conn_reap_list, conn);
}

Expand All @@ -939,7 +931,6 @@ tls_start(tls_conn *conn, nng_stream *tcp)
conn->tcp = tcp;
rv = conn->ops.init(
(void *) (conn + 1), conn, (void *) (conn->cfg + 1));
log_debug("*** tls_start: conn %p, tcp %p, rv %d", conn, conn->tcp, rv);
return (rv);
}

Expand All @@ -948,7 +939,6 @@ tls_tcp_error(tls_conn *conn, int rv)
{
// An error here is fatal. Shut it all down.
nni_aio *aio;
log_debug("*** tls_tcp_error: nng_stream_close conn %p, tcp %p", conn, conn->tcp);
nng_stream_close(conn->tcp);
nni_aio_close(&conn->tcp_send);
nni_aio_close(&conn->tcp_recv);
Expand Down

0 comments on commit 2b61013

Please sign in to comment.