fix bug when compare version

This commit is contained in:
ymqytw 2016-11-11 15:20:15 -08:00
parent 3e169be887
commit af8fbc327d

View File

@ -1442,7 +1442,7 @@ func GetServerSupportedSMPatchVersion(discoveryClient discovery.DiscoveryInterfa
if serverGitVersion >= string(SMPatchVersion_1_5) { if serverGitVersion >= string(SMPatchVersion_1_5) {
return SMPatchVersion_1_5, nil return SMPatchVersion_1_5, nil
} }
if serverGitVersion >= string(SMPatchVersion_1_5) { if serverGitVersion >= string(SMPatchVersion_1_0) {
return SMPatchVersion_1_0, nil return SMPatchVersion_1_0, nil
} }
return Unknown, fmt.Errorf("The version is too old: %v\n", serverVersion) return Unknown, fmt.Errorf("The version is too old: %v\n", serverVersion)