diff options
| author | Pieter Wuille <[email protected]> | 2012-04-17 11:05:02 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2012-04-17 11:05:02 -0700 |
| commit | caeddc5d3738c95e0755560aa3d9b1f32e9fbce5 (patch) | |
| tree | ab6df15302cd3c818e45e6f19330b044db988a94 /src/main.cpp | |
| parent | Merge pull request #1112 from sipa/saneserial (diff) | |
| parent | Fix potential deadlock (diff) | |
| download | discoin-caeddc5d3738c95e0755560aa3d9b1f32e9fbce5.tar.xz discoin-caeddc5d3738c95e0755560aa3d9b1f32e9fbce5.zip | |
Merge pull request #1117 from sipa/deadlockfix
Fix potential deadlock
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 16a1f3455..46b409cda 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; |