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

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f9c59f  fix: response future should close channel before callback 
(#1113)
3f9c59f is described below

commit 3f9c59fdf5d4cef0994939228f40886517d42d6f
Author: WeizhongTu <weizhong....@alibaba-inc.com>
AuthorDate: Mon Dec 4 11:13:16 2023 +0800

    fix: response future should close channel before callback (#1113)
---
 internal/remote/remote_client.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/remote/remote_client.go b/internal/remote/remote_client.go
index c0ef6ce..d433b8d 100644
--- a/internal/remote/remote_client.go
+++ b/internal/remote/remote_client.go
@@ -231,10 +231,10 @@ func (c *remotingClient) processCMD(cmd *RemotingCommand, 
r *tcpConnWrapper) {
                        responseFuture := resp.(*ResponseFuture)
                        go primitive.WithRecover(func() {
                                responseFuture.ResponseCommand = cmd
-                               responseFuture.executeInvokeCallback()
                                if responseFuture.Done != nil {
                                        close(responseFuture.Done)
                                }
+                               responseFuture.executeInvokeCallback()
                        })
                }
        } else {

Reply via email to