This is an automated email from the ASF dual-hosted git repository.
fuyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 28085013 golang: fix longpolling timeout (#290)
28085013 is described below
commit 280850139e8ada6897063695a80d9cb7b3e4d6eb
Author: guyinyou <[email protected]>
AuthorDate: Wed Nov 23 14:34:27 2022 +0800
golang: fix longpolling timeout (#290)
Co-authored-by: guyinyou <[email protected]>
---
golang/simple_consumer.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/golang/simple_consumer.go b/golang/simple_consumer.go
index 17029e5d..57ba0252 100644
--- a/golang/simple_consumer.go
+++ b/golang/simple_consumer.go
@@ -292,7 +292,7 @@ func (sc *defaultSimpleConsumer) Receive(ctx
context.Context, maxMessageNum int3
return nil, err
}
request := sc.wrapReceiveMessageRequest(int(maxMessageNum),
selectMessageQueue, filterExpression, invisibleDuration)
- timeout := invisibleDuration + sc.cli.opts.timeout
+ timeout := sc.scOpts.awaitDuration + sc.cli.opts.timeout
return sc.receiveMessage(ctx, request, selectMessageQueue, timeout)
}