We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6792e63 commit 1d48e45Copy full SHA for 1d48e45
1 file changed
common/remote/rpc/rpc_client.go
@@ -407,7 +407,13 @@ func (r *RpcClient) RegisterConnectionListener(listener IConnectionEventListener
407
}
408
409
func (r *RpcClient) switchServerAsync(recommendServerInfo ServerInfo, onRequestFail bool) {
410
- r.reconnectionChan <- ReconnectContext{serverInfo: recommendServerInfo, onRequestFail: onRequestFail}
+ select {
411
+ case r.reconnectionChan <- ReconnectContext{serverInfo: recommendServerInfo, onRequestFail: onRequestFail}:
412
+ // Reconnection request sent successfully
413
+ default:
414
+ // Channel is full, skip this request as reconnection is already in progress
415
+ logger.Warnf("reconnection already in progress, skip this request")
416
+ }
417
418
419
func (r *RpcClient) reconnect(serverInfo ServerInfo, onRequestFail bool) {
0 commit comments