Skip to content

Commit a618886

Browse files
committed
lib: repair condition inversion in contexts_pool_insert
If a client disconnects, e.g. because gromox-http was stopped for too long in a debugger, a log message may occur: ``` contexts_pool: failed to modify event in epoll: No such file or directory (T1), No such file or directory (T2) contexts_pool: error in context queue! b_waiting mismatch in thread_work_func context: 0xabc ``` Fixes: gromox-1.32-15-ge32abdc21 last hunk
1 parent 72ece36 commit a618886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/contexts_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void contexts_pool_insert(schedule_context *pcontext, sctx_status tpraw)
409409
}
410410
} else if (g_poll_ctx.mod(pcontext, false) != 0) {
411411
int se = errno;
412-
if (errno == ENOENT && g_poll_ctx.mod(pcontext, true) != 0) {
412+
if (errno == ENOENT && g_poll_ctx.mod(pcontext, true) == 0) {
413413
/* sometimes, fd will be removed by scanning
414414
thread because of timeout, add it back
415415
into epoll queue again */

0 commit comments

Comments
 (0)