summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/peer.c b/src/peer.c
index 74f5649..dd73584 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -153,8 +153,6 @@ fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *per
ctx->conf->protocol->free_peer_state(ctx, perm_peer);
- fastd_task_delete_peer_handshakes(ctx, perm_peer);
-
perm_peer->address = temp_peer->address;
perm_peer->state = STATE_ESTABLISHED;
perm_peer->seen = temp_peer->seen;
@@ -170,6 +168,7 @@ fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *per
}
fastd_task_replace_peer(ctx, temp_peer, perm_peer);
+ fastd_task_delete_peer_handshakes(ctx, perm_peer);
fastd_peer_reset(ctx, temp_peer);