From 24477805418533613d20c215575fb870ebcb61e6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 13 Dec 2019 09:12:35 +0300 Subject: client: skip \r --- client/transport.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/transport.hpp b/client/transport.hpp index ae56f73..6311edd 100644 --- a/client/transport.hpp +++ b/client/transport.hpp @@ -83,9 +83,9 @@ private: } std::string read_line() { - const auto bytes = boost::asio::read_until(m_socket, m_buffer, '\n'); + const auto bytes = boost::asio::read_until(m_socket, m_buffer, "\r\n"); const auto data = boost::asio::buffer_cast(m_buffer.data()); - const std::string result{data, bytes - 1}; + const std::string result{data, bytes - 2}; // Skip \r\n m_buffer.consume(bytes); return result; } -- cgit v1.2.3