xfreerdp-server: Fixed deadlock issue in event queue.
Writing to the pipe may block if the pipe is full. Holding the mutex while writing prevents listeners from aquiring the mutex and unblocking the write. This leads to a deadlock situation.
This commit is contained in:
parent
2719580501
commit
151182cbc8
@ -96,9 +96,9 @@ void xf_event_push(xfEventQueue* event_queue, xfEvent* event)
|
||||
|
||||
event_queue->events[(event_queue->count)++] = event;
|
||||
|
||||
xf_set_event(event_queue);
|
||||
|
||||
pthread_mutex_unlock(&(event_queue->mutex));
|
||||
|
||||
xf_set_event(event_queue);
|
||||
}
|
||||
|
||||
xfEvent* xf_event_peek(xfEventQueue* event_queue)
|
||||
|
Loading…
Reference in New Issue
Block a user