This is an automated email from the ASF dual-hosted git repository.

wwbmmm 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 80a4906b avoid rdma::GlobalRelease before event dispatcher is stop 
(#2220)
80a4906b is described below

commit 80a4906b97d358b3c417f051e8a0cf38c42ffe27
Author: Tuvie <[email protected]>
AuthorDate: Sun Apr 23 10:50:08 2023 +0800

    avoid rdma::GlobalRelease before event dispatcher is stop (#2220)
---
 src/brpc/rdma/rdma_helper.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/brpc/rdma/rdma_helper.cpp b/src/brpc/rdma/rdma_helper.cpp
index ef910706..f72aa755 100644
--- a/src/brpc/rdma/rdma_helper.cpp
+++ b/src/brpc/rdma/rdma_helper.cpp
@@ -510,6 +510,8 @@ static void GlobalRdmaInitializeOrDieImpl() {
         ExitWithError();
     }
 
+    atexit(GlobalRelease);
+
     SocketOptions opt;
     opt.fd = g_context->async_fd;
     butil::make_close_on_exec(opt.fd);
@@ -523,8 +525,6 @@ static void GlobalRdmaInitializeOrDieImpl() {
         ExitWithError();
     }
 
-    atexit(GlobalRelease);
-
     g_mem_alloc = butil::iobuf::blockmem_allocate;
     g_mem_dealloc = butil::iobuf::blockmem_deallocate;
     butil::iobuf::blockmem_allocate = BlockAllocate;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to