Mercurial > irccd
changeset 232:5563a2415e34
Irccd: unqueue input even if no I/O
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 10 Aug 2016 10:50:41 +0200 |
parents | 00e2c31469b2 |
children | f8094e852dd5 |
files | lib/irccd/conn-state-ready.cpp |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/irccd/conn-state-ready.cpp Wed Aug 10 10:50:03 2016 +0200 +++ b/lib/irccd/conn-state-ready.cpp Wed Aug 10 10:50:41 2016 +0200 @@ -55,18 +55,17 @@ if (FD_ISSET(cnx.m_socket.handle(), &out)) cnx.syncOutput(); - if (FD_ISSET(cnx.m_socket.handle(), &in)) { + if (FD_ISSET(cnx.m_socket.handle(), &in)) cnx.syncInput(); - std::string msg; - - do { - msg = util::nextNetwork(cnx.m_input); + std::string msg; - if (!msg.empty()) - parse(cnx, msg); - } while (!msg.empty()); - } + do { + msg = util::nextNetwork(cnx.m_input); + + if (!msg.empty()) + parse(cnx, msg); + } while (!msg.empty()); } } // !irccd