Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion common/remote/rpc/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,13 @@ func (r *RpcClient) RegisterConnectionListener(listener IConnectionEventListener
}

func (r *RpcClient) switchServerAsync(recommendServerInfo ServerInfo, onRequestFail bool) {
r.reconnectionChan <- ReconnectContext{serverInfo: recommendServerInfo, onRequestFail: onRequestFail}
select {
case r.reconnectionChan <- ReconnectContext{serverInfo: recommendServerInfo, onRequestFail: onRequestFail}:
// Reconnection request sent successfully
default:
// Channel is full, skip this request as reconnection is already in progress
logger.Warnf("reconnection already in progress, skip this request")
}
}

func (r *RpcClient) reconnect(serverInfo ServerInfo, onRequestFail bool) {
Expand Down