summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Lossless_UDP.c3
-rw-r--r--core/net_crypto.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/core/Lossless_UDP.c b/core/Lossless_UDP.c
index 9d31a53b..1f123eda 100644
--- a/core/Lossless_UDP.c
+++ b/core/Lossless_UDP.c
@@ -198,7 +198,8 @@ int new_inconnection(IP_Port ip_port)
198 connections[i].SYNC_rate = SYNC_RATE; 198 connections[i].SYNC_rate = SYNC_RATE;
199 connections[i].data_rate = DATA_SYNC_RATE; 199 connections[i].data_rate = DATA_SYNC_RATE;
200 connections[i].last_recv = current_time(); 200 connections[i].last_recv = current_time();
201 connections[i].killat = ~0; 201 //if this connection isn't handled within 5 seconds, kill it
202 connections[i].killat = current_time() + 1000000UL*CONNEXION_TIMEOUT;
202 connections[i].send_counter = 127; 203 connections[i].send_counter = 127;
203 return i; 204 return i;
204 } 205 }
diff --git a/core/net_crypto.c b/core/net_crypto.c
index 2af5239b..faeb6be6 100644
--- a/core/net_crypto.c
+++ b/core/net_crypto.c
@@ -660,6 +660,9 @@ static void receive_crypto()
660 { 660 {
661 increment_nonce(crypto_connections[i].recv_nonce); 661 increment_nonce(crypto_connections[i].recv_nonce);
662 crypto_connections[i].status = 3; 662 crypto_connections[i].status = 3;
663
664 //connection is accepted so we disable the auto kill by setting it to about 1 month from now.
665 kill_connection_in(crypto_connections[i].number, 3000000);
663 } 666 }
664 else 667 else
665 { 668 {