wwbmmm commented on code in PR #2571:
URL: https://github.com/apache/brpc/pull/2571#discussion_r1527722472
##########
src/brpc/policy/streaming_rpc_protocol.cpp:
##########
@@ -146,19 +148,24 @@ void SendStreamClose(Socket *sock, int64_t
remote_stream_id,
fm.set_frame_type(FRAME_TYPE_CLOSE);
butil::IOBuf out;
PackStreamMessage(&out, fm, NULL);
- sock->Write(&out);
+ Socket::WriteOptions wopt;
+ wopt.ignore_eovercrowded = true;
+ sock->Write(&out, &wopt);
}
int SendStreamData(Socket* sock, const butil::IOBuf* data,
int64_t remote_stream_id, int64_t source_stream_id) {
+ CHECK(sock != NULL);
StreamFrameMeta fm;
fm.set_stream_id(remote_stream_id);
fm.set_source_stream_id(source_stream_id);
fm.set_frame_type(FRAME_TYPE_DATA);
fm.set_has_continuation(false);
butil::IOBuf out;
PackStreamMessage(&out, fm, data);
- return sock->Write(&out);
+ Socket::WriteOptions wopt;
+ wopt.ignore_eovercrowded = true;
Review Comment:
如果发送data太频繁,会不会导致内存爆了?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]