Tuvie commented on code in PR #1836:
URL: https://github.com/apache/incubator-brpc/pull/1836#discussion_r936256208
##########
src/brpc/socket.cpp:
##########
@@ -626,6 +630,23 @@ int Socket::Create(const SocketOptions& options, SocketId*
id) {
m->_ssl_state = (options.initial_ssl_ctx == NULL ? SSL_OFF : SSL_UNKNOWN);
m->_ssl_session = NULL;
m->_ssl_ctx = options.initial_ssl_ctx;
+#if BRPC_WITH_RDMA
+ if (options.use_rdma) {
+ m->_rdma_ep = new (std::nothrow)rdma::RdmaEndpoint(m);
+ if (!m->_rdma_ep) {
+ const int saved_errno = errno;
+ PLOG(ERROR) << "Fail to create RdmaEndpoint";
+ m->SetFailed(saved_errno, "Fail to create RdmaEndpoint: %s",
+ berror(saved_errno));
+ return -1;
+ }
+ m->_rdma_state = RDMA_UNKNOWN;
+ } else {
+ delete m->_rdma_ep;
Review Comment:
已修改
--
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]