If we see EAGAIN, no data was sent over the socket, so we still have to
retry sending of msgfds next time.
Signed-off-by: linzhecheng <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
s->write_msgfds,
s->write_msgfds_num);
- /* free the written msgfds, no matter what */
- if (s->write_msgfds_num) {
+ /* free the written msgfds in any cases other than errno==EAGAIN */
+ if (EAGAIN != errno && s->write_msgfds_num) {
g_free(s->write_msgfds);
s->write_msgfds = 0;
s->write_msgfds_num = 0;