Browse Source

Merge pull request #9968 from Quasilyte/quasilyte/fixCaseOrder

etcdctl/ctlv2/command: fix type switch case order
Xiang Li 7 years ago
parent
commit
93be31d43a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      etcdctl/ctlv2/command/util.go

+ 4 - 4
etcdctl/ctlv2/command/util.go

@@ -270,14 +270,14 @@ func isConnectionError(err error) bool {
 			return true
 		}
 		return isConnectionError(t.Err)
-	case net.Error:
-		if t.Timeout() {
-			return true
-		}
 	case syscall.Errno:
 		if t == syscall.ECONNREFUSED {
 			return true
 		}
+	case net.Error:
+		if t.Timeout() {
+			return true
+		}
 	}
 	return false
 }