From: Yingxin Date: Fri, 28 Dec 2018 02:40:58 +0000 (+0800) Subject: crimson/net: remove unnecessary empty buffer check X-Git-Tag: v14.1.0~481^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02e6cc46226a419b0825f8d19dbd36082d54ca20;p=ceph.git crimson/net: remove unnecessary empty buffer check Signed-off-by: Yingxin --- diff --git a/src/crimson/net/SocketConnection.cc b/src/crimson/net/SocketConnection.cc index 789c0ac7936e..a18e6c302a61 100644 --- a/src/crimson/net/SocketConnection.cc +++ b/src/crimson/net/SocketConnection.cc @@ -75,9 +75,6 @@ void SocketConnection::read_tags_until_next_message() // read the next tag return socket->read_exactly(1) .then([this] (auto buf) { - if (buf.empty()) { - throw std::system_error(make_error_code(error::read_eof)); - } switch (buf[0]) { case CEPH_MSGR_TAG_MSG: // stop looping and notify read_header()