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 5af5d6d fix: ignore name server connection read timeout log (#1117)
5af5d6d is described below
commit 5af5d6d7cae3305729d8290324aab0617752e685
Author: WeizhongTu <[email protected]>
AuthorDate: Wed Dec 6 17:59:31 2023 +0800
fix: ignore name server connection read timeout log (#1117)
* fix: ignore conn read timeout
* fix: ignore conn read timeout
* fix: ignore conn read timeout
---
internal/remote/remote_client.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/internal/remote/remote_client.go b/internal/remote/remote_client.go
index d433b8d..76db1a1 100644
--- a/internal/remote/remote_client.go
+++ b/internal/remote/remote_client.go
@@ -179,7 +179,12 @@ func (c *remotingClient) receiveResponse(r
*tcpConnWrapper) {
if r.isClosed(err) {
return
}
- if err != io.EOF {
+ // ignore name server connection read timeout
+ if netErr, ok := err.(net.Error); ok &&
netErr.Timeout() {
+ rlog.Debug("conn error, close connection",
map[string]interface{}{
+ rlog.LogKeyUnderlayError: err,
+ })
+ } else if err != io.EOF {
rlog.Error("conn error, close connection",
map[string]interface{}{
rlog.LogKeyUnderlayError: err,
})