Skip to content

Commit 9c4c3ef

Browse files
committed
floop
1 parent ba1f519 commit 9c4c3ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

coderd/files/cache.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ func (c *Cache) Release(fileID uuid.UUID) {
9797
return
9898
}
9999
refCount := entry.refCount.Add(-1)
100-
if refCount < 1 {
101-
delete(c.data, fileID)
100+
if refCount > 0 {
101+
return
102102
}
103+
delete(c.data, fileID)
103104
}

0 commit comments

Comments
 (0)