Skip to content

Commit 01084b0

Browse files
authored
Handle TCP read errors (#92)
1 parent b16a3c8 commit 01084b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Transports/TCP.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ void TCP::read() {
5252
size_t len = mSocket.read_some(boost::asio::buffer(buf), error);
5353
if (error == boost::asio::error::eof) {
5454
break;
55+
} else {
56+
return;
5557
}
5658
std::cout.write(buf.data(), len);
5759
}

0 commit comments

Comments
 (0)