bzs1118 commented on code in PR #3480:
URL: https://github.com/apache/brpc/pull/3480#discussion_r3848865773
##########
src/brpc/input_messenger.cpp:
##########
@@ -369,7 +369,14 @@ void InputMessenger::OnNewMessages(Socket* m) {
if (messenger->ProcessNewMessage(m, nr, read_eof, received_us,
base_realtime, last_msg) < 0) {
return;
- }
+ }
+ // If the transport switched its edge trigger during parsing (e.g.,
+ // RDMA handshake completed and edge trigger changed to
+ // OnNewDataFromTcp), stop reading to avoid racing with the new
+ // edge trigger handler on _read_buf.
+ if (m->_transport->ShouldStopReading()) {
+ return;
+ }
Review Comment:
done
--
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]