소스 검색

default security to auto

Darien Raymond 8 년 전
부모
커밋
08ece5d2bf
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      common/protocol/headers.go

+ 1 - 4
common/protocol/headers.go

@@ -86,10 +86,7 @@ type CommandSwitchAccount struct {
 }
 
 func (sc *SecurityConfig) AsSecurity() Security {
-	if sc == nil {
-		return Security(SecurityType_LEGACY)
-	}
-	if sc.Type == SecurityType_AUTO {
+	if sc == nil || sc.Type == SecurityType_AUTO {
 		if runtime.GOARCH == "amd64" || runtime.GOARCH == "s390x" {
 			return Security(SecurityType_AES128_GCM)
 		}