summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/net_crypto.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 59a068c8..92727a8c 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -782,10 +782,6 @@ static void kill_timedout(Net_Crypto *c)
782 if (c->crypto_connections[i].status != CONN_NO_CONNECTION 782 if (c->crypto_connections[i].status != CONN_NO_CONNECTION
783 && is_connected(c->lossless_udp, c->crypto_connections[i].number) == 4) 783 && is_connected(c->lossless_udp, c->crypto_connections[i].number) == 4)
784 c->crypto_connections[i].status = CONN_TIMED_OUT; 784 c->crypto_connections[i].status = CONN_TIMED_OUT;
785 else if (is_connected(c->lossless_udp, c->crypto_connections[i].number) == 4) {
786 kill_connection(c->lossless_udp, c->crypto_connections[i].number);
787 c->crypto_connections[i].number = ~0;
788 }
789 } 785 }
790} 786}
791 787
@@ -794,8 +790,8 @@ void do_net_crypto(Net_Crypto *c)
794{ 790{
795 do_lossless_udp(c->lossless_udp); 791 do_lossless_udp(c->lossless_udp);
796 handle_incomings(c); 792 handle_incomings(c);
797 receive_crypto(c);
798 kill_timedout(c); 793 kill_timedout(c);
794 receive_crypto(c);
799} 795}
800 796
801void kill_net_crypto(Net_Crypto *c) 797void kill_net_crypto(Net_Crypto *c)