diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 6728231d..c8d69494 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1222,14 +1222,14 @@ void doFriends(Messenger *m) | |||
1222 | set_friend_status(m, i, FRIEND_CONFIRMED); | 1222 | set_friend_status(m, i, FRIEND_CONFIRMED); |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | break; | 1225 | if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) { |
1226 | } | 1226 | /* If we stopped recieving ping packets, kill it. */ |
1227 | crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id); | ||
1228 | m->friendlist[i].crypt_connection_id = -1; | ||
1229 | set_friend_status(m, i, FRIEND_CONFIRMED); | ||
1230 | } | ||
1227 | 1231 | ||
1228 | if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) { | 1232 | break; |
1229 | /* If we stopped recieving ping packets, kill it. */ | ||
1230 | crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id); | ||
1231 | m->friendlist[i].crypt_connection_id = -1; | ||
1232 | set_friend_status(m, i, FRIEND_CONFIRMED); | ||
1233 | } | 1233 | } |
1234 | } | 1234 | } |
1235 | } | 1235 | } |