You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/07/18 14:53:58 UTC

[GitHub] [rocketmq-client-go] Imfan opened a new issue #701: 异步消费总是提示 request timeout

Imfan opened a new issue #701:
URL: https://github.com/apache/rocketmq-client-go/issues/701


   用demo里的异步消费总是提示 request timeout
   
   感觉是  producer 247行
   
   ```
   	var cancel context.CancelFunc
   	ctx, cancel = context.WithTimeout(ctx, 3*time.Second)
   	defer cancel()
   ```
   
   这里调用了cancel(),但是 在 	[go primitive.WithRecover](https://github.com/apache/rocketmq-client-go/blob/a7a73875c91957ef595544cbaef3aa3dd1e11657/internal/remote/remote_client.go#L98) 这里起了个协程等待响应。
   cancel()的执行大概率会 先执行,然后执行了这里的[代码](https://github.com/apache/rocketmq-client-go/blob/a7a73875c91957ef595544cbaef3aa3dd1e11657/internal/remote/future.go#L64)。
   
   去了cancel(),应该也不会有内存泄露,因为select的另一个分支会执行


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-go] wenfengwang closed issue #701: 异步消费总是提示 request timeout

Posted by GitBox <gi...@apache.org>.
wenfengwang closed issue #701:
URL: https://github.com/apache/rocketmq-client-go/issues/701


   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org