From b0a169a1465a75592f0083a3e4e17c307878fc73 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 7 Jun 2012 00:56:47 +0200 Subject: Limit handshake frequency where possible --- src/peer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/peer.c') diff --git a/src/peer.c b/src/peer.c index 078bfdc..f412836 100644 --- a/src/peer.c +++ b/src/peer.c @@ -176,9 +176,17 @@ static inline void setup_peer(fastd_context *ctx, fastd_peer *peer) { peer->address = peer->config->address; peer->established = false; + peer->last_resolve = (struct timespec){0, 0}; peer->last_resolve_return = (struct timespec){0, 0}; peer->seen = (struct timespec){0, 0}; + + peer->last_handshake = (struct timespec){0, 0}; + peer->last_handshake_address.sa.sa_family = AF_UNSPEC; + + peer->last_handshake_response = (struct timespec){0, 0}; + peer->last_handshake_response_address.sa.sa_family = AF_UNSPEC; + peer->protocol_state = NULL; if (!fastd_peer_is_floating(peer)) -- cgit v1.2.3