diff options
author | root <root> | 2007-11-06 18:49:32 +0000 |
---|---|---|
committer | root <root> | 2007-11-06 18:49:32 +0000 |
commit | 0b7b062fb0b1c4f1ab22a52bd91f3c86195a084e (patch) | |
tree | f3b759463d9b47888a9c98095a3748513f360e39 /event.c | |
parent | 0268b6db718e75046444d22af082aedd7c4cae01 (diff) |
*** empty log message ***rel-0_51
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -144,7 +144,12 @@ x_cb (struct event *ev, int revents) static void x_cb_sig (EV_P_ struct ev_signal *w, int revents) { - x_cb ((struct event *)(((char *)w) - offsetof (struct event, iosig.sig)), revents); + struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.sig)); + + if (revents & EV_ERROR) + event_del (ev); + + x_cb (ev, revents); } static void @@ -152,7 +157,9 @@ x_cb_io (EV_P_ struct ev_io *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.io)); - if (!(ev->ev_events & EV_PERSIST) && ev_is_active (w)) + if (revents & EV_ERROR) + event_del (ev); + else if (!(ev->ev_events & EV_PERSIST) && ev_is_active (w)) ev_io_stop (EV_A_ w); x_cb (ev, revents); |