Browse Source

Merge pull request #1117 from sipa/deadlockfix

Fix potential deadlock
0.8
Pieter Wuille 13 years ago
parent
commit
caeddc5d37
  1. 4
      src/main.cpp

4
src/main.cpp

@ -2838,8 +2838,8 @@ bool ProcessMessages(CNode* pfrom) @@ -2838,8 +2838,8 @@ bool ProcessMessages(CNode* pfrom)
bool SendMessages(CNode* pto, bool fSendTrickle)
{
{
LOCK(cs_main);
TRY_LOCK(cs_main, lockMain);
if (lockMain) {
// Don't send anything until we get their version message
if (pto->nVersion == 0)
return true;

Loading…
Cancel
Save