wgdzlh opened a new issue, #1022: URL: https://github.com/apache/rocketmq-client-go/issues/1022
**BUG REPORT** 1. Should only invoke callback when rrf is timout, as in Java client, or the callback will be called twice when RPC is finished normally: https://github.com/apache/rocketmq-client-go/blob/6c77b6792c224cff2f3f971fc44d4a7ab0d8a29e/internal/request_response_future.go#L54-L57 https://github.com/apache/rocketmq/blob/e7f29798ece70e218f7233a7ec85f01e8706a062/client/src/main/java/org/apache/rocketmq/client/producer/RequestFutureHolder.java#L67 2. Since we already use chan `Done` to sync the write and read of response message, there is no need use mutex: https://github.com/apache/rocketmq-client-go/blob/6c77b6792c224cff2f3f971fc44d4a7ab0d8a29e/internal/request_response_future.go#L133-L145 3. Consider edge cases, we should add non-blocking check of chan Done before calculate timeout, to avoid any possibility of duplicate callback: https://github.com/apache/rocketmq-client-go/blob/6c77b6792c224cff2f3f971fc44d4a7ab0d8a29e/internal/request_response_future.go#L147-L150 -- 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]
