diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 16:33:37 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 16:33:37 -0700 |
commit | 0b44919ba23021231dd561f530c5d30836846735 (patch) | |
tree | 1d3075b301c5a2e7139fb9b415eb4baef3601212 /node/IncomingPacket.cpp | |
parent | 9f550292fe0ebc32e61eeada9e3a69970c874724 (diff) | |
download | infinitytier-0b44919ba23021231dd561f530c5d30836846735.tar.gz infinitytier-0b44919ba23021231dd561f530c5d30836846735.zip |
Clusters can send multiple OKs so we must allow this.
Diffstat (limited to 'node/IncomingPacket.cpp')
-rw-r--r-- | node/IncomingPacket.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index f54752d1..b77ead4c 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -1481,14 +1481,15 @@ bool IncomingPacket::_doREQUEST_PROOF_OF_WORK(const RuntimeEnvironment *RR,const void IncomingPacket::_sendErrorNeedCredentials(const RuntimeEnvironment *RR,const SharedPtr<Peer> &peer,const uint64_t nwid) { - if (peer->rateGateOutgoingComRequest(RR->node->now())) { + const uint64_t now = RR->node->now(); + if (peer->rateGateOutgoingComRequest(now)) { Packet outp(source(),RR->identity.address(),Packet::VERB_ERROR); outp.append((uint8_t)verb()); outp.append(packetId()); outp.append((uint8_t)Packet::ERROR_NEED_MEMBERSHIP_CERTIFICATE); outp.append(nwid); outp.armor(peer->key(),true); - _path->send(RR,outp.data(),outp.size(),RR->node->now()); + _path->send(RR,outp.data(),outp.size(),now); } } |