From 0b2285d57012111b16eca820fef59c46662b59b3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 26 Feb 2013 23:07:41 +0100 Subject: Don't reset "seen" timestamp on peer reset --- src/peer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/peer.c b/src/peer.c index 7921b7e..88b61ef 100644 --- a/src/peer.c +++ b/src/peer.c @@ -160,7 +160,6 @@ static void setup_peer(fastd_context_t *ctx, fastd_peer_t *peer) { 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; @@ -402,6 +401,7 @@ fastd_peer_t* fastd_peer_add(fastd_context_t *ctx, fastd_peer_config_t *peer_con peer->protocol_config = peer_conf->protocol_config; peer->protocol_state = NULL; peer->sock = NULL; + peer->seen = (struct timespec){0, 0}; setup_peer(ctx, peer); pr_verbose(ctx, "adding peer %P (group `%s')", peer, peer->group->conf->name); @@ -423,6 +423,7 @@ fastd_peer_t* fastd_peer_add_temporary(fastd_context_t *ctx, fastd_socket_t *soc peer->group = ctx->peer_group; peer->protocol_state = NULL; peer->sock = sock; + peer->seen = ctx->now; setup_peer(ctx, peer); peer->address = *addr; -- cgit v1.2.3