Skip to content

Commit

Permalink
check for TLS_AGAIN whether bytes were read or not
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Sep 26, 2024
1 parent 90bf8e4 commit 92f6553
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tlsuv.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,6 @@ static void process_inbound(tlsuv_stream_t *clt) {

if (total > 0) {
clt->read_cb((uv_stream_t *) clt, (ssize_t) total, &buf);
if (rc == TLS_AGAIN) {
break;
}
continue;
}

Expand All @@ -409,6 +406,10 @@ static void process_inbound(tlsuv_stream_t *clt) {
}

clt->read_cb((uv_stream_t *) clt, (ssize_t) total, &buf);

if (rc == TLS_AGAIN) {
break;
}
}
UM_LOG(TRACE, "finished reading after %d iterations", 16 - attempts);
}
Expand Down

0 comments on commit 92f6553

Please sign in to comment.