diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-11-05 22:35:29 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-11-05 22:35:29 +0100 |
commit | 773e84403fae0da82575f04eef911a31267b167a (patch) | |
tree | 96604e7e1bb0371a236b0d2689e64d96240268f7 /src | |
parent | 8f60a96b84b1f952b0f3073e5df52f024162ef4b (diff) | |
download | fastd-773e84403fae0da82575f04eef911a31267b167a.tar fastd-773e84403fae0da82575f04eef911a31267b167a.zip |
Add randomized initial handshake delays
This delay should barely be noticable, and it will make fastd connect to a
random choice of peers when a peer limit is set
Diffstat (limited to 'src')
-rw-r--r-- | src/peer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -228,7 +228,7 @@ static void setup_peer(fastd_context *ctx, fastd_peer *peer) { ctx->conf->protocol->init_peer_state(ctx, peer); if (!fastd_peer_is_floating(peer) || fastd_peer_is_dynamic(peer)) - fastd_task_schedule_handshake(ctx, peer, 0); + fastd_task_schedule_handshake(ctx, peer, fastd_rand(ctx, 0, 3000)); } static void delete_peer(fastd_context *ctx, fastd_peer *peer) { |