Skip to content

Commit c86a2ef

Browse files
committed
dumb deadlock play
Signed-off-by: grokspawn <[email protected]>
1 parent 52a4979 commit c86a2ef

File tree

1 file changed

+2
-2
lines changed
  • pkg/controller/registry/resolver/cache

1 file changed

+2
-2
lines changed

pkg/controller/registry/resolver/cache/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ func (hdr *snapshotHeader) Valid() bool {
336336
}
337337

338338
func (hdr *snapshotHeader) RequestSentinelActive() bool {
339+
hdr.m.RLock()
340+
defer hdr.m.RUnlock()
339341
if hdr == nil {
340342
return false
341343
}
342344

343-
hdr.m.RLock()
344-
defer hdr.m.RUnlock()
345345
return time.Now().Before(hdr.requestSentinel)
346346
}
347347

0 commit comments

Comments
 (0)