char-socket: tcp_chr_recv(): add comment

Add comment, to stress that the order of operation (first drop old fds,
second check read status) is intended.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2025-09-16 16:13:51 +03:00 committed by Daniel P. Berrangé
parent 6e9a6d57bf
commit 9adc8d052d

View file

@ -294,7 +294,12 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len)
}
if (msgfds_num) {
/* close and clean read_msgfds */
/*
* Close and clean previous read_msgfds, they are obsolete at
* this point, regardless result of new call to
* qio_channel_readv_full().
*/
for (i = 0; i < s->read_msgfds_num; i++) {
close(s->read_msgfds[i]);
}