summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2007-11-01 09:21:51 +0000
committerroot <root>2007-11-01 09:21:51 +0000
commit5aeb50d21d1ef0b2fff324f21c608967dcfeb60c (patch)
tree405484d46266725f6664322b617e36a2ca20b921
parent77ddb901ea55fe7425f9e2f9201a0641a0b8e5fd (diff)
*** empty log message ***
-rw-r--r--ev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index 9f35287..9674c7c 100644
--- a/ev.c
+++ b/ev.c
@@ -170,6 +170,12 @@ static int pendingmax, pendingcnt;
static void
event (W w, int events)
{
+ if (w->pending)
+ {
+ pendings [w->pending - 1].events |= events;
+ return;
+ }
+
w->pending = ++pendingcnt;
array_needsize (pendings, pendingmax, pendingcnt, );
pendings [pendingcnt - 1].w = w;
@@ -257,8 +263,8 @@ fd_recheck (void)
if (fcntl (fd, F_GETFD) == -1 && errno == EBADF)
while (anfds [fd].head)
{
- event ((W)anfds [fd].head, EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT);
ev_io_stop (anfds [fd].head);
+ event ((W)anfds [fd].head, EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT);
}
}