Skip to content

Commit a28b757

Browse files
committed
Simplify SimpleLock check
1 parent 69328fa commit a28b757

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mautrix/util/simple_lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def locked(self) -> bool:
4747
return not self.noop_mode and not self._event.is_set()
4848

4949
async def wait(self, task: str | None = None) -> None:
50-
if not self.noop_mode and not self._event.is_set():
50+
if self.locked:
5151
if self.log and self.message:
5252
self.log.debug(self.message, task)
5353
await self._event.wait()

0 commit comments

Comments
 (0)