Skip to content
Snippets Groups Projects
Unverified Commit a735486e authored by Xin.Zh's avatar Xin.Zh Committed by GitHub
Browse files

Merge pull request #877 from fangyincheng/fix-heartbeat

Fix: using close to defeat block on hearbeat pendingResponse.done
parents 427efb86 55d69fe4
No related branches found
No related tags found
No related merge requests found
......@@ -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())
}
......
......@@ -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)
}
}
// //////////////////////////////////////////
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment