aboutsummaryrefslogtreecommitdiff
path: root/src/mbedtls.c
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-09-20 20:48:48 +0930
committerDavid Timber <mieabby@gmail.com>2020-09-20 20:48:48 +0930
commit756ab80daa05a0d2f0d777d364164df94cb552c2 (patch)
tree3d2fb0f81520dc22911dbd34d03757035df9d041 /src/mbedtls.c
parente6bc98e641f9fceb47fb0e6c71775dce65b0ebab (diff)
* Fix bug in htbt: set client socket non-block
* htbt: enforce HTBT_LBD_MAX_CLIENTS * Fix bug: wrong use of pth_poll_ev() in * prne_mbedtls_pth_handle() * lssh2_handle()
Diffstat (limited to 'src/mbedtls.c')
-rw-r--r--src/mbedtls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbedtls.c b/src/mbedtls.c
index 65d2685..3b77315 100644
--- a/src/mbedtls.c
+++ b/src/mbedtls.c
@@ -141,6 +141,9 @@ bool prne_mbedtls_pth_handle (
do {
pollret = prne_pth_poll(&pfd, 1, -1, ev);
+ if (ev != NULL && pth_event_status(ev) == PTH_STATUS_OCCURRED) {
+ return false;
+ }
if (pollret < 0) {
if (errno == EINTR) {
continue;
@@ -149,9 +152,6 @@ bool prne_mbedtls_pth_handle (
return false;
}
}
- if (pollret == 0 || pth_event_status(ev) == PTH_STATUS_OCCURRED) {
- return false;
- }
} while (false);
}
}