diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c index e1b460ab..00a11472 100644 --- a/toxcore/TCP_client.c +++ b/toxcore/TCP_client.c @@ -446,6 +446,9 @@ static int handle_TCP_packet(TCP_Client_Connection *conn, uint8_t *data, uint16_ uint8_t con_id = data[1] - NUM_RESERVED_PORTS; + if (conn->connections[con_id].status == 0) + return 0; + if (conn->connections[con_id].status != 2) return -1;