forked from boostorg/beast
Fix stream::read_size_hint calculation
This commit is contained in:
1 parent
576edfaaed
commit
028fda0237
2 files changed
+6
-2
No files matched your search
@@ -98,8 +98,11 @@ read_size_hint(
|
||||
buffer.max_size(), clamp(rd_.remain));
|
||||
}
|
||||
}
|
||||
return (std::min)(buffer.max_size(), (std::max)(
|
||||
(std::max)(+tcp_frame_size, clamp(rd_.remain)),
|
||||
return (std::min)(
|
||||
buffer.max_size() - buffer.size(),
|
||||
(std::max)((std::max)(
|
||||
+tcp_frame_size,
|
||||
clamp(rd_.remain)),
|
||||
buffer.capacity() - buffer.size()));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user