diff options
| author | Cory Fields <[email protected]> | 2016-11-15 17:26:32 -0500 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2016-11-23 19:53:28 -0500 |
| commit | d74e352e0136bb746c2975f9a4092f23b9d8899c (patch) | |
| tree | 8493599f95d7ef3cdcd8b1dfd715313435c53bbc /src/main.cpp | |
| parent | Merge #8930: Move orphan processing to ActivateBestChain (diff) | |
| download | discoin-d74e352e0136bb746c2975f9a4092f23b9d8899c.tar.xz discoin-d74e352e0136bb746c2975f9a4092f23b9d8899c.zip | |
net: Set feelers to disconnect at the end of the version message
This way we're not relying on messages going out after fDisconnect has been
set.
This should not cause any real behavioral changes, though feelers should
arguably disconnect earlier in the process. That can be addressed in a later
functional change.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 05442057e..bc4be84e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5086,12 +5086,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (strCommand == NetMsgType::VERSION) { - // Feeler connections exist only to verify if address is online. - if (pfrom->fFeeler) { - assert(pfrom->fInbound == false); - pfrom->fDisconnect = true; - } - // Each connection can only send one version message if (pfrom->nVersion != 0) { @@ -5227,6 +5221,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeOffset = nTime - GetTime(); pfrom->nTimeOffset = nTimeOffset; AddTimeData(pfrom->addr, nTimeOffset); + + // Feeler connections exist only to verify if address is online. + if (pfrom->fFeeler) { + assert(pfrom->fInbound == false); + pfrom->fDisconnect = true; + } } |