mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
550751d0ff
When sendmsg() reports EAGAIN, _sendmsg rescheduled itself with loop.add_reader(fd, _sendmsg, loop, fut, sock, fd) which waits for the socket to become readable rather than writable, and passes four of the six required arguments, so the callback raised TypeError once it did fire. Wait for writability and pass the message and descriptors through. Also skip the work in _recvmsg if the future was cancelled while waiting for data, as _sendmsg already does, so a cancelled read does not end in InvalidStateError from set_result. This module is imported by the server as well, so both paths are reached by the daemon whenever a descriptor is passed over the local socket.