zchuango commented on code in PR #3535:
URL: https://github.com/apache/brpc/pull/3535#discussion_r4034263165
##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -1480,16 +915,16 @@ void RdmaEndpoint::DeallocateResources() {
DeallocateCq(_resource->send_cq);
DeallocateCq(_resource->recv_cq);
- if (_resource->comp_channel != nullptr) {
- if (_cq_sid != INVALID_SOCKET_ID) {
+ if (nullptr != _resource->comp_channel) {
// Destroy send_comp_channel will destroy this fd,
// so that we should remove it from epoll fd first
int fd = _resource->comp_channel->fd;
- GetGlobalEventDispatcher(fd,
_socket->_io_event.bthread_tag()).RemoveConsumer(fd);
+ GetGlobalEventDispatcher(fd, _socket->_io_event.bthread_tag())
+ .RemoveConsumer(fd);
Review Comment:
Fixed. The _cq_sid != INVALID_SOCKET_ID guard has been restored before
removing the RDMA completion-channel consumer.
--
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]