# HG changeset patch # User William Pitcock # Date 1241674599 18000 # Node ID 0059591028117c09cd2584675c36a8f6bc47d481 # Parent f8686c591e495b39e411ab703fc98d9c1d00135c neon: avoid deadlocks in NEON_STATUS_ERROR codepath. diff -r f8686c591e49 -r 005959102811 src/neon/neon.c --- a/src/neon/neon.c Thu May 07 00:30:11 2009 -0500 +++ b/src/neon/neon.c Thu May 07 00:36:39 2009 -0500 @@ -1050,10 +1050,13 @@ */ _DEBUG("<%p> NEON_READER_ERROR happened. Terminating reader thread and marking EOF.", h); h->reader_status.status = NEON_READER_EOF; + g_mutex_unlock(h->reader_status.mutex); if (NULL != h->reader) kill_reader(h); + g_mutex_lock(h->reader_status.mutex); + case NEON_READER_EOF: /* * If there still is data in the buffer, carry on.