You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/11/22 11:49:49 UTC
[dubbo-go] branch develop updated: Fix: fix heartbeat for client
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new 55d69fe Fix: fix heartbeat for client
new a735486 Merge pull request #877 from fangyincheng/fix-heartbeat
55d69fe is described below
commit 55d69fe48faaaa708eb7143cec47ecd985c608d8
Author: fangyincheng <fa...@sina.com>
AuthorDate: Sun Nov 15 16:00:41 2020 +0800
Fix: fix heartbeat for client
---
remoting/exchange_client.go | 2 +-
remoting/getty/listener.go | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go
index 26fa5d5..ef0c3db 100644
--- a/remoting/exchange_client.go
+++ b/remoting/exchange_client.go
@@ -204,7 +204,7 @@ func (client *ExchangeClient) Handler(response *Response) {
if pendingResponse.Callback == nil {
pendingResponse.Err = pendingResponse.response.Error
- pendingResponse.Done <- struct{}{}
+ close(pendingResponse.Done)
} else {
pendingResponse.Callback(pendingResponse.GetCallResponse())
}
diff --git a/remoting/getty/listener.go b/remoting/getty/listener.go
index 196aa20..97c9e7b 100644
--- a/remoting/getty/listener.go
+++ b/remoting/getty/listener.go
@@ -153,7 +153,9 @@ func (h *RpcClientHandler) OnCron(session getty.Session) {
return
}
- h.conn.pool.rpcClient.heartbeat(session)
+ if err := h.conn.pool.rpcClient.heartbeat(session); err != nil {
+ logger.Warnf("failed to send heartbeat, error: %v", err)
+ }
}
// //////////////////////////////////////////