tevent: fd events do not work correctly for UDP socket?
jra at samba.org
Wed Aug 19 18:12:50 UTC 2020
On Wed, Aug 19, 2020 at 07:15:13PM +0200, Pavel Březina via samba-technical wrote:
> I see. If I understand it correctly epoll returns EPOLLERR and the code hits
> this  line?
> > I don't think this is tevent specific behavior.
> If the above is true then tevent should provide way for the handler to check
> for errors or don't call a read handler on an error so read does not get
Calling read() and getting an error *is* the way you detect
an error here.
Remember, doing the connect() on a UDP socket didn't
send anything over the wire, it just set up the association.
When you do the write(), then you're actually asking
for something to go over the wire, and then tevent/epoll
can actually know there was nothing listening on the
More information about the samba-technical