mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Connection bug fixed.
This commit is contained in:
parent
0e2173367a
commit
abd4278fc4
|
@ -356,12 +356,12 @@ int kill_connection(Lossless_UDP *ludp, int connection_id)
|
|||
}
|
||||
|
||||
/*
|
||||
* Kill connection in seconds.
|
||||
* timeout connection in seconds.
|
||||
*
|
||||
* return -1 if it can not kill the connection.
|
||||
* return 0 if it will kill it.
|
||||
*/
|
||||
int kill_connection_in(Lossless_UDP *ludp, int connection_id, uint32_t seconds)
|
||||
int timeout_connection_in(Lossless_UDP *ludp, int connection_id, uint32_t seconds)
|
||||
{
|
||||
if ((unsigned int)connection_id < ludp->connections.len) {
|
||||
Connection *connection = &tox_array_get(&ludp->connections, connection_id, Connection);
|
||||
|
@ -1049,7 +1049,7 @@ static void do_new(Lossless_UDP *ludp)
|
|||
}
|
||||
|
||||
if (tmp->status > 0 && tmp->killat < temp_time)
|
||||
kill_connection(ludp, tmp_i);
|
||||
tmp->status = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -167,12 +167,12 @@ int incoming_connection(Lossless_UDP *ludp, uint32_t numpackets);
|
|||
int kill_connection(Lossless_UDP *ludp, int connection_id);
|
||||
|
||||
/*
|
||||
* Kill connection in seconds seconds.
|
||||
* timeout connection in seconds seconds.
|
||||
*
|
||||
* return -1 if it can not kill the connection.
|
||||
* return 0 if it will kill it.
|
||||
*/
|
||||
int kill_connection_in(Lossless_UDP *ludp, int connection_id, uint32_t seconds);
|
||||
int timeout_connection_in(Lossless_UDP *ludp, int connection_id, uint32_t seconds);
|
||||
|
||||
|
||||
/* Check if connection is confirmed.
|
||||
|
|
Loading…
Reference in New Issue
Block a user