Skip to content

Commit 881ddef

Browse files
author
Tony Crisci
committed
fix error with timeouts
1 parent bd0f8ef commit 881ddef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

i3ipc/connection.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,12 @@ def main(self, timeout: float = 0.0):
484484
"""
485485
loop_exception = None
486486
self._quitting = False
487+
timer = None
488+
487489
while True:
488490
try:
489491
self._event_socket_setup()
490492

491-
timer = None
492-
493493
if timeout:
494494
timer = Timer(timeout, self.main_quit)
495495
timer.start()

0 commit comments

Comments
 (0)