瀏覽代碼

clientv3: retry mutable ops on "no connection available"

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 年之前
父節點
當前提交
c669ff9765
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      clientv3/retry.go

+ 2 - 1
clientv3/retry.go

@@ -45,7 +45,8 @@ func isNonRepeatableStopError(err error) bool {
 	if ev.Code() != codes.Unavailable {
 		return true
 	}
-	return rpctypes.ErrorDesc(err) != "there is no address available"
+	desc := rpctypes.ErrorDesc(err)
+	return desc != "there is no address available" && desc != "there is no connection available"
 }
 
 func (c *Client) newRetryWrapper(isStop retryStopErrFunc) retryRPCFunc {