diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-20 22:51:40 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-20 22:51:40 +0100 |
commit | b5d83e3988d346af26b479b7c1be96185de040aa (patch) | |
tree | ac1de596302c14d46a576f788b3fca31bb11a80c /src/fastd.c | |
parent | 9f1a5ab5614976e10c4cfaeb055b6c0058b8ba20 (diff) | |
download | fastd-b5d83e3988d346af26b479b7c1be96185de040aa.tar fastd-b5d83e3988d346af26b479b7c1be96185de040aa.zip |
Implement new hash table to keep track of unknown peers handshakes have been sent to
This should significantly reduce the number of handshakes sent after restarting
fastd with many active connections.
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c index f05b43e..4ac0e8e 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -489,7 +489,8 @@ static inline void init(int argc, char *argv[]) { fastd_update_time(); ctx.next_maintenance = ctx.now + MAINTENANCE_INTERVAL; - ctx.unknown_handshakes[0].timeout = ctx.now; + + fastd_receive_unknown_init(); #ifdef WITH_DYNAMIC_PEERS fastd_sem_init(&ctx.verify_limit, VERIFY_LIMIT); @@ -663,6 +664,8 @@ static inline void cleanup(void) { ERR_free_strings(); #endif + fastd_receive_unknown_free(); + close_log(); fastd_config_release(); } |