Skip to content

Commit

Permalink
Merge pull request #239 from openziti/always.check.tls_again
Browse files Browse the repository at this point in the history
check for TLS_AGAIN whether bytes were read or not
  • Loading branch information
scareything authored Sep 26, 2024
2 parents 90bf8e4 + 92f6553 commit 697532a
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 697532a

Please sign in to comment.