diff options
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -133,7 +133,7 @@ static void reset_peer(fastd_context_t *ctx, fastd_peer_t *peer) { free_socket(ctx, peer); - memset(&peer->local_address, 0, sizeof(peer->local_address)), + memset(&peer->local_address, 0, sizeof(peer->local_address)); ctx->conf->protocol->reset_peer_state(ctx, peer); @@ -158,6 +158,8 @@ static void setup_peer(fastd_context_t *ctx, fastd_peer_t *peer) { else peer->address = peer->config->address; + memset(&peer->local_address, 0, sizeof(peer->local_address)); + peer->established = false; peer->last_resolve = (struct timespec){0, 0}; |