diff options
author | Omar Polo <op@omarpolo.com> | 2023-08-04 09:52:27 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-08-04 09:52:27 +0000 |
commit | 1b1a6fb7ee90529dbf0697954ed01f76a65f7d65 (patch) | |
tree | 9691cc2946328e8f53ee4190d6bc910a0ad05ba2 /titan.c | |
parent | fcc5a371b135db8bbbb250bf1793ffffd06dc644 (diff) |
titan: iomux: return -1 on EOF without receving anything
otherwise it enters an infinite loop where it tries to read, return
zero, and tries again...
Diffstat (limited to 'titan.c')
-rw-r--r-- | titan.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -112,6 +112,8 @@ iomux(struct tls *ctx, int fd, const char *in, size_t inlen, char *out, case -1: return -1; case 0: + if (outwrote == 0) + return -1; return outwrote; default: outwrote += ret; |