From 756ab80daa05a0d2f0d777d364164df94cb552c2 Mon Sep 17 00:00:00 2001 From: David Timber Date: Sun, 20 Sep 2020 20:48:48 +0930 Subject: * 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() --- src/libssh2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libssh2.c') diff --git a/src/libssh2.c b/src/libssh2.c index 23c2f1d..530e4ef 100644 --- a/src/libssh2.c +++ b/src/libssh2.c @@ -87,7 +87,14 @@ static int lssh2_handle ( } f_ret = prne_pth_poll(&pfd, 1, -1, ev); - if (f_ret <= 0) { + if (f_ret < 0) { + if (errno == EINTR) { + if (ev == NULL || + pth_event_status(ev) != PTH_STATUS_OCCURRED) + { + continue; + } + } f_ret = -1; break; } -- cgit