diff options
Diffstat (limited to 'src/supplemental/tls/tls_common.c')
| -rw-r--r-- | src/supplemental/tls/tls_common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/supplemental/tls/tls_common.c b/src/supplemental/tls/tls_common.c index 7d89ea21..409c6600 100644 --- a/src/supplemental/tls/tls_common.c +++ b/src/supplemental/tls/tls_common.c @@ -1228,6 +1228,8 @@ nng_tls_engine_send(void *arg, const uint8_t *buf, size_t *szp) // We are committed at this point to sending out len bytes. // Update this now, so that we can use len to update. *szp = len; + conn->tcp_send_len += len; + NNI_ASSERT(conn->tcp_send_len <= NNG_TLS_MAX_SEND_SIZE); while (len > 0) { if (head >= tail) { @@ -1243,11 +1245,11 @@ nng_tls_engine_send(void *arg, const uint8_t *buf, size_t *szp) buf += cnt; head += cnt; head %= NNG_TLS_MAX_SEND_SIZE; - conn->tcp_send_len += cnt; - conn->tcp_send_head = head; len -= cnt; } + conn->tcp_send_head = head; + tls_tcp_send_start(conn); return (0); } |
