mirror of
https://github.com/RYGhub/royalnet.git
synced 2025-03-13 12:07:32 +00:00
🐛 Don't keep dispensers locked if a conversation raises
This commit is contained in:
parent
812d16ab06
commit
0f07d5c2b2
1 changed files with 5 additions and 4 deletions
|
@ -95,10 +95,11 @@ class Dispenser:
|
|||
log.debug(f"Adding lock: {conv!r}")
|
||||
self._locked_by.append(conv)
|
||||
|
||||
yield
|
||||
|
||||
log.debug(f"Clearing lock: {conv!r}")
|
||||
self._locked_by.remove(conv)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
log.debug(f"Clearing lock: {conv!r}")
|
||||
self._locked_by.remove(conv)
|
||||
|
||||
|
||||
__all__ = (
|
||||
|
|
Loading…
Add table
Reference in a new issue