Skip to content

Commit a9b376b

Browse files
committed
code comment
1 parent ca5dc31 commit a9b376b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/setting/oauth2.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ func loadOAuth2From(rootCfg ConfigProvider) {
155155
}
156156
}
157157

158+
// generalSigningSecret is used as container for a []byte value
159+
// instead of an additional mutex, we use CompareAndSwap func to change the value thread save
158160
var generalSigningSecret atomic.Pointer[[]byte]
159161

160162
func GetGeneralTokenSigningSecret() []byte {

0 commit comments

Comments
 (0)