summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 05:34:24 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 05:34:24 +0200
commit3a87d747a015b2ff2150ed163ad56b1bc677e6b0 (patch)
treee64a8ae0998909873fcfd48ce6b0dd751e66d088 /src
parent96ec41768b5937e5cf0cd83bf815d365d12d1f93 (diff)
downloadfastd-3a87d747a015b2ff2150ed163ad56b1bc677e6b0.tar
fastd-3a87d747a015b2ff2150ed163ad56b1bc677e6b0.zip
Use handshake splay time for unestablished peers as well
Diffstat (limited to 'src')
-rw-r--r--src/fastd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 695edaa..59e5c54 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -370,10 +370,7 @@ static void send_handshake(fastd_context *ctx, fastd_peer *peer) {
pr_debug(ctx, "sending handshake to %P...", peer);
ctx->conf->protocol->handshake_init(ctx, peer);
- if (fastd_peer_is_established(peer))
- fastd_task_schedule_handshake(ctx, peer, fastd_rand(ctx, 10000, 20000));
- else
- fastd_task_schedule_handshake(ctx, peer, 20000);
+ fastd_task_schedule_handshake(ctx, peer, fastd_rand(ctx, 17500, 22500));
}
static void handle_tasks(fastd_context *ctx) {