Skip to content

Commit f0b1ac4

Browse files
Block infinite time if timeout has not been given.
1 parent f71d527 commit f0b1ac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/interfaces/virtual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self, channel=None, **config):
4141

4242
def recv(self, timeout=None):
4343
try:
44-
msg = self.queue.get(block=bool(timeout), timeout=timeout)
44+
msg = self.queue.get(block=True, timeout=timeout)
4545
except queue.Empty:
4646
return None
4747

0 commit comments

Comments
 (0)