Commit 08dcba7b authored by DMG's avatar DMG

Revert "Avoid spurious buffer errors when buffer exactly full"

This reverts commit baee165a.
parent baee165a
......@@ -97,7 +97,7 @@ public:
}
bool feed(const char* data, size_t len) {
if (size + len > N) {
if (size + len >= N) {
return false;
}
......
......@@ -355,7 +355,7 @@ Transport::handleIncoming(const std::shared_ptr<Connection>& connection) {
else {
totalBytes += bytes;
if (totalBytes > Const::MaxBuffer) {
if (totalBytes >= Const::MaxBuffer) {
std::cerr << "Too long packet" << std::endl;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment