summaryrefslogtreecommitdiff
path: root/node/Network.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-25 13:42:20 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-25 13:42:20 -0700
commita019c3dd5d141d07a1554e36b6b4c942edfc4d70 (patch)
tree745e76548d3d51277bf6a42534f13d10d058ccec /node/Network.hpp
parenta3ef9b8a15554326aaffdf14ebcf7795e5b73aff (diff)
downloadinfinitytier-a019c3dd5d141d07a1554e36b6b4c942edfc4d70.tar.gz
infinitytier-a019c3dd5d141d07a1554e36b6b4c942edfc4d70.zip
Tighten up credential push just a bit for faster up-time with older nodes, should not have significant impact on bandwidth. Also some cleanup and push direct path timing fixes.
Diffstat (limited to 'node/Network.hpp')
-rw-r--r--node/Network.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index 9350b3b5..969e1f14 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -369,6 +369,21 @@ public:
}
/**
+ * Push credentials if we haven't done so in a very long time
+ *
+ * @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
+ * @param to Destination peer address
+ * @param now Current time
+ */
+ inline void pushCredentialsIfNeeded(void *tPtr,const Address &to,const int64_t now)
+ {
+ Mutex::Lock _l(_lock);
+ Membership &m = _membership(to);
+ if (m.shouldPushCredentials(now))
+ m.pushCredentials(RR,tPtr,now,to,_config,-1);
+ }
+
+ /**
* Destroy this network
*
* This sets the network to completely remove itself on delete. This also prevents the