Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6dd71b1

Browse files
authored
fix(coderd/cryptokeys): relock mutex to avoid double unlock (#16802)
1 parentf21fcbd commit6dd71b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎coderd/cryptokeys/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ func (c *cache) cryptoKey(ctx context.Context, sequence int32) (string, []byte,
251251
}
252252

253253
c.fetching=true
254-
c.mu.Unlock()
255254

255+
c.mu.Unlock()
256256
keys,err:=c.cryptoKeys(ctx)
257+
c.mu.Lock()
257258
iferr!=nil {
258259
return"",nil,xerrors.Errorf("get keys: %w",err)
259260
}
260261

261-
c.mu.Lock()
262262
c.lastFetch=c.clock.Now()
263263
c.refresher.Reset(refreshInterval)
264264
c.keys=keys

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp