summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peer.c b/src/peer.c
index dd73584..9e3e501 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -148,6 +148,10 @@ fastd_peer* fastd_peer_add_temp(fastd_context *ctx, const fastd_peer_address *ad
return peer;
}
+void fastd_peer_clean_handshakes(fastd_context *ctx, fastd_peer *peer) {
+ fastd_task_delete_peer_handshakes(ctx, peer);
+}
+
fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *perm_peer, fastd_peer *temp_peer) {
pr_debug(ctx, "merging peer %P into %P", temp_peer, perm_peer);
@@ -168,7 +172,6 @@ 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);
@@ -178,8 +181,6 @@ fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *per
}
void fastd_peer_set_established(fastd_context *ctx, fastd_peer *peer) {
- fastd_task_delete_peer_handshakes(ctx, peer);
-
switch(peer->state) {
case STATE_WAIT:
pr_info(ctx, "Connection with %P established.", peer);