This is an automated email from the ASF dual-hosted git repository.
serverglen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 09f0916f fix stream while max_buf_size < 0 (#2360)
09f0916f is described below
commit 09f0916f36cde9cc2637cd01a021895ba0981e27
Author: baiyang <[email protected]>
AuthorDate: Thu Sep 21 10:02:42 2023 +0800
fix stream while max_buf_size < 0 (#2360)
---
src/brpc/stream.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/brpc/stream.cpp b/src/brpc/stream.cpp
index 8b346bd6..47d776d5 100644
--- a/src/brpc/stream.cpp
+++ b/src/brpc/stream.cpp
@@ -74,7 +74,7 @@ int Stream::Create(const StreamOptions &options,
s->_connected = false;
s->_options = options;
s->_closed = false;
- s->_cur_buf_size = options.max_buf_size;
+ s->_cur_buf_size = options.max_buf_size > 0 ? options.max_buf_size : 0;
if (options.max_buf_size > 0 && options.min_buf_size >
options.max_buf_size) {
// set 0 if min_buf_size is invalid.
s->_options.min_buf_size = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]