diff --git a/src/common/angel_connection.c b/src/common/angel_connection.c index 551c60d..76e5528 100644 --- a/src/common/angel_connection.c +++ b/src/common/angel_connection.c @@ -291,7 +291,7 @@ static gboolean angel_connection_read(liAngelConnection *acon, GError **err) { static void angel_connection_io_cb(liEventBase *watcher, int events) { liAngelConnection *acon = LI_CONTAINER_OF(li_event_io_from(watcher), liAngelConnection, fd_watcher); - if (events | LI_EV_WRITE) { + if (events & LI_EV_WRITE) { GString *out_str; int i; ssize_t written, len; @@ -368,7 +368,7 @@ write_eagain: if (out_queue_empty) li_event_io_rem_events(&acon->fd_watcher, LI_EV_WRITE); } - if (events | LI_EV_READ) { + if (events & LI_EV_READ) { GError *err = NULL; if (!angel_connection_read(acon, &err)) { li_event_clear(&acon->out_notify_watcher); diff --git a/src/common/memcached.c b/src/common/memcached.c index baf507e..74dcb75 100644 --- a/src/common/memcached.c +++ b/src/common/memcached.c @@ -737,7 +737,7 @@ static void memcached_io_cb(liEventBase *watcher, int events) { li_memcached_con_acquire(con); /* make sure con isn't freed in the middle of something */ - if (events | LI_EV_WRITE) { + if (events & LI_EV_WRITE) { int i; ssize_t written, len; gchar *data; @@ -781,7 +781,7 @@ write_eagain: send_queue_clean(&con->out); } - if (events | LI_EV_READ) { + if (events & LI_EV_READ) { do { handle_read(con); } while (con->remaining && con->remaining->used > 0);