I'm seeing a situation where I get a read callback for a watcher on a socket 
that was recently closed due to a write error. This is with 4.03, testing on my 
Mac 10.6.7 laptop. The sequence I'm seeing:

1) Writing to the socket fails
2) I call ev_io_stop for that connection
3) I call close on the associated FD
4) I free the memory for the watcher
5) My read callback is later called with the now-freed watcher, revents == 
EV_READ
6) I try to read the FD again, that fails
7) I double free the watcher (after calling ev_io_stop again)
8) Fun ensues

I'm calling ev_io_init with only EV_READ, not EV_WRITE, and I suspect that's 
part of the problem here, but this behavior still seems poor. Why would my 
callback still be invoked after I call ev_io_stop on the watcher? Is there any 
way to stop the watcher when writing fails?

Thanks
Dave Golombek
Lookout Mobile Security
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to