forked from M-Labs/artiq
1
0
Fork 0

Client: add note about timeout sideeffects

This commit is contained in:
Robert Jördens 2016-02-02 15:42:47 -07:00
parent f7df393248
commit c28b938471
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ class Client:
(default), ``0`` for non-blocking, and a finite value to raise (default), ``0`` for non-blocking, and a finite value to raise
``socket.timeout`` if an operation does not complete within the ``socket.timeout`` if an operation does not complete within the
given time. See also ``socket.create_connection()`` and given time. See also ``socket.create_connection()`` and
``socket.settimeout()`` in the Python standard library. ``socket.settimeout()`` in the Python standard library. A timeout
in the middle of a RPC can break subsequent RPCs (from the same
client).
""" """
def __init__(self, host, port, target_name=AutoTarget, timeout=None): def __init__(self, host, port, target_name=AutoTarget, timeout=None):
self.__socket = socket.create_connection((host, port), timeout) self.__socket = socket.create_connection((host, port), timeout)