libev callbacks getting called for same socket fd and same event

Sandeep sandeep at b-one.net
Wed Jan 11 05:29:02 CET 2012


Hello,



I am using libev alongside a 3rd party software libcurl. libcurl gives
me a socket and an associated event. My job is to track the event on the
socket and then call back libcurl again saying that, the event has
happened on the socket. For this I am using libev (for notifying me when
the event happens on the socket).




Now the problem is libev call back is getting repeatedly called for the
same socket and event, though I am acting on it. What I mean is, when
libev notify's me I have to call libcurl again with that socket fd and
event. Further libcurl actually performs read/write operation on the fd.
Though I am doing this, libev is repeatedly calling me with same socket
fd and event, recursively. Thus some of my fd's will never be completed,
thus getting stuck.




Please help me what might be going wrong. I am using ev_io and ev_timer
functions (init/start/stop).




Thanks,

-Sandeep





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20120111/3e3fb1ca/attachment.html>


More information about the libev mailing list