From 52b479518e5be219137c3518d440d3fed3aad353 Mon Sep 17 00:00:00 2001 From: GeorgyKirichenko <kirichenkoga@gmail.com> Date: Mon, 25 Apr 2016 15:11:23 +0300 Subject: [PATCH] Don't stop connection if there is no pending requests. Fixed #1439 --- src/box/iproto.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/box/iproto.cc b/src/box/iproto.cc index 6c96c483ed..89ab0b325a 100644 --- a/src/box/iproto.cc +++ b/src/box/iproto.cc @@ -590,7 +590,10 @@ iproto_connection_on_input(ev_loop *loop, struct ev_io *watcher, try { /* Ensure we have sufficient space for the next round. */ struct iobuf *iobuf; - if (mempool_count(&iproto_msg_pool) > IPROTO_MSG_MAX || + if ((mempool_count(&iproto_msg_pool) > IPROTO_MSG_MAX && + /* Don't stop connection if there is no pending requests */ + (ibuf_used(&con->iobuf[0]->in) > con->parse_size || + ibuf_used(&con->iobuf[1]->in))) || (iobuf = iproto_connection_input_iobuf(con)) == NULL) { ev_io_stop(loop, &con->input); -- GitLab