media_server: Fix deadlock when killing from ProcessController

This commit is contained in:
Dario Casalinuovo
2015-07-27 20:25:31 +02:00
parent 009034bdf0
commit 5934b30b95
+7
View File
@@ -918,6 +918,13 @@ ServerApp::_ControlThread(void* _server)
int32 code;
while ((size = read_port_etc(server->_ControlPort(), &code, data,
sizeof(data), 0, 0)) > 0) {
// NOTE: This prevents locks in Deskbar and
// possibly in other situations.
if (size == B_WOULD_BLOCK) {
snooze(100);
continue;
}
server->_HandleMessage(code, data, size);
}