From a21b841034bf266d27dbe0cfa5c405c4084ac8ae Mon Sep 17 00:00:00 2001 From: lazio579 Date: Wed, 14 Nov 2018 16:28:29 +0800 Subject: [PATCH] Fix issue 157 --- src/chassis-event.c | 3 --- src/network-mysqld.c | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chassis-event.c b/src/chassis-event.c index 3ad19cd..cd4e9c7 100644 --- a/src/chassis-event.c +++ b/src/chassis-event.c @@ -62,9 +62,6 @@ void chassis_event_add_with_timeout(chassis *chas, struct event *ev, struct timeval *tv) { event_base_set(chas->event_base, ev); -#if NETWORK_DEBUG_TRACE_EVENT - CHECK_PENDING_EVENT(ev); -#endif event_add(ev, tv); g_debug("%s:event add ev:%p", G_STRLOC, ev); } diff --git a/src/network-mysqld.c b/src/network-mysqld.c index c3a465b..41d7975 100644 --- a/src/network-mysqld.c +++ b/src/network-mysqld.c @@ -4080,7 +4080,10 @@ network_mysqld_con_handle(int event_fd, short events, void *user_data) break; case ST_READ_QUERY: g_debug(G_STRLOC " %p con_handle -> ST_READ_QUERY", con); - CHECK_PENDING_EVENT(&(con->client->event)); + + if (events == EV_READ) { + CHECK_PENDING_EVENT(&(con->client->event)); + } /* TODO If config is reloaded, close all current cons */ g_assert(events == 0 || event_fd == con->client->fd);