Only set event if entry still exists
parent
37d94fbb28
commit
2227721dac
|
@ -174,8 +174,10 @@ async def maybe_open_ctx(
|
||||||
log.warning(f'De-allocating resource for {key}')
|
log.warning(f'De-allocating resource for {key}')
|
||||||
|
|
||||||
# terminate mngr nursery
|
# terminate mngr nursery
|
||||||
_, no_more_users = cache.resources[ctx_key]
|
entry = cache.resources.get(ctx_key)
|
||||||
no_more_users.set()
|
if entry:
|
||||||
|
_, no_more_users = entry
|
||||||
|
no_more_users.set()
|
||||||
|
|
||||||
|
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
|
|
Loading…
Reference in New Issue