diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 6b691ad8..82c31147 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1999,8 +1999,8 @@ Messenger *new_messenger(Mono_Time *mono_time, Messenger_Options *options, unsig | |||
1999 | m->net_crypto = new_net_crypto(m->log, m->mono_time, m->dht, &options->proxy_info); | 1999 | m->net_crypto = new_net_crypto(m->log, m->mono_time, m->dht, &options->proxy_info); |
2000 | 2000 | ||
2001 | if (m->net_crypto == nullptr) { | 2001 | if (m->net_crypto == nullptr) { |
2002 | kill_networking(m->net); | ||
2003 | kill_dht(m->dht); | 2002 | kill_dht(m->dht); |
2003 | kill_networking(m->net); | ||
2004 | friendreq_kill(m->fr); | 2004 | friendreq_kill(m->fr); |
2005 | logger_kill(m->log); | 2005 | logger_kill(m->log); |
2006 | free(m); | 2006 | free(m); |
@@ -2012,7 +2012,7 @@ Messenger *new_messenger(Mono_Time *mono_time, Messenger_Options *options, unsig | |||
2012 | m->onion_c = new_onion_client(m->mono_time, m->net_crypto); | 2012 | m->onion_c = new_onion_client(m->mono_time, m->net_crypto); |
2013 | m->fr_c = new_friend_connections(m->mono_time, m->onion_c, options->local_discovery_enabled); | 2013 | m->fr_c = new_friend_connections(m->mono_time, m->onion_c, options->local_discovery_enabled); |
2014 | 2014 | ||
2015 | if (!(m->onion && m->onion_a && m->onion_c)) { | 2015 | if (!(m->onion && m->onion_a && m->onion_c && m->fr_c)) { |
2016 | kill_friend_connections(m->fr_c); | 2016 | kill_friend_connections(m->fr_c); |
2017 | kill_onion(m->onion); | 2017 | kill_onion(m->onion); |
2018 | kill_onion_announce(m->onion_a); | 2018 | kill_onion_announce(m->onion_a); |