From 8c24d1e84b45566c30a05008bedf71cce42d3d05 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 28 Jan 2014 15:44:07 +0100 Subject: [PATCH] Add client_{lock,unlock} before call to non_block_events in connection_continue. Problem is that if non_block_events fire records, then we will not unlock client at all. And as a result a dead-lock occurs. --- src/connection.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/connection.c b/src/connection.c index 5f127ea..41e693c 100644 --- a/src/connection.c +++ b/src/connection.c @@ -284,7 +284,13 @@ void connection_continue(struct connection *co) { int r = ZOOM_connection_exec_task(co->link); if (!r) + { + struct client *cl = co->client; + + client_lock(cl); non_block_events(co); + client_unlock(cl); + } else { iochan_setflags(co->iochan, ZOOM_connection_get_mask(co->link)); -- 1.7.10.4