mirror of
https://github.com/nasa/trick.git
synced 2025-04-12 05:40:06 +00:00
Fix timeout error in VariableServer.fromPID
After calculating the remaining timeout, make sure it's still non-negative. Refs #365
This commit is contained in:
parent
29bdbee8fa
commit
3db5056db3
@ -1003,6 +1003,8 @@ def fromPID(pid, timeout=None):
|
||||
while True:
|
||||
if timeout is not None:
|
||||
timeout -= (time.time() - clock)
|
||||
if timeout < 0:
|
||||
raise socket.timeout
|
||||
clock = time.time()
|
||||
sock.settimeout(timeout)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user