Document inverted mutex lock/unlock.

All other code in this file does lock/call/unlock, except this one
instance, so we should explain why.
This commit is contained in:
iphydf 2017-06-05 00:46:38 +00:00
parent ced07d6700
commit 1bbe446760
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -1957,6 +1957,8 @@ static int tcp_data_callback(void *object, int id, const uint8_t *data, uint16_t
return tcp_handle_cookie_request(c, conn->connection_number_tcp, data, length);
}
// This unlocks the mutex that at this point is locked by do_tcp before
// calling do_tcp_connections.
pthread_mutex_unlock(&c->tcp_mutex);
int ret = handle_packet_connection(c, id, data, length, 0, userdata);
pthread_mutex_lock(&c->tcp_mutex);