# HG changeset patch # User Thomas Klausner # Date 1560176907 -7200 # Node ID 643883ec68efb2edd16f4540d0527ab0ef66cdd7 # Parent f1bbcab403a6451d9b9a99b954ba733b5b3da739 Handle case of thread cancellation in pthread_cond_timedwait (exp_fct) diff -r f1bbcab403a6 -r 643883ec68ef libfdproto/sessions.c --- a/libfdproto/sessions.c Mon Jun 10 16:27:54 2019 +0200 +++ b/libfdproto/sessions.c Mon Jun 10 16:28:27 2019 +0200 @@ -222,6 +222,10 @@ } while (1); + if (errno == EINVAL) { + /* assume thread was cancelled in pthread_cond_timedwait */ + pthread_exit(0); + } TRACE_DEBUG(INFO, "A system error occurred in session module! Expiry thread is terminating..."); ASSERT(0); return NULL;