Commit 3436a646 authored by Thomas Guillem's avatar Thomas Guillem Committed by Max Kellermann

storage/nfs: fix deadlock when connecting

The Connect method can be called between Schedule and lock. In that case, when locked, the state is already set to CONNECTING of READY and the condition won't be signaled anymore.
parent aed0af1e
......@@ -3,6 +3,8 @@ ver 0.19.10 (not yet released)
- smbclient: fix DFF playback
* encoder
- opus: fix bogus granulepos
* neighbor
- nfs: fix deadlock when connecting
ver 0.19.9 (2015/02/06)
* decoder
......
......@@ -177,6 +177,8 @@ private:
mutex.unlock();
DeferredMonitor::Schedule();
mutex.lock();
if (state == State::INITIAL)
cond.wait(mutex);
break;
case State::CONNECTING:
......@@ -188,8 +190,6 @@ private:
error.Set(last_error);
return false;
}
cond.wait(mutex);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment