From: Adam Dickmeiss Date: Tue, 28 Jan 2014 14:44:07 +0000 (+0100) Subject: Add client_{lock,unlock} before call to non_block_events X-Git-Tag: v1.6.39~14 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=8c24d1e84b45566c30a05008bedf71cce42d3d05;p=pazpar2-moved-to-github.git 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. --- 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));