summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-02 09:50:57 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-04-02 09:50:57 (GMT)
commit81c41dbfccf7b2a6bcab2570c102bb591674c567 (patch)
tree2ffe8cb15d69f72ca58115f717547708d556e296 /Doc/library/socket.rst
parent708d9ba5a228de83267e9ecc57f4fde90c326b84 (diff)
downloadcpython-81c41dbfccf7b2a6bcab2570c102bb591674c567.zip
cpython-81c41dbfccf7b2a6bcab2570c102bb591674c567.tar.gz
cpython-81c41dbfccf7b2a6bcab2570c102bb591674c567.tar.bz2
Issue #23618: socket.socket.connect() now waits until the connection completes
instead of raising InterruptedError if the connection is interrupted by signals, signal handlers don't raise an exception and the socket is blocking or has a timeout. socket.socket.connect() still raise InterruptedError for non-blocking sockets.
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 85eaabf..9a69ad4 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -830,6 +830,19 @@ to sockets.
Connect to a remote socket at *address*. (The format of *address* depends on the
address family --- see above.)
+ If the connection is interrupted by a signal, the method waits until the
+ connection completes, or raise a :exc:`socket.timeout` on timeout, if the
+ signal handler doesn't raise an exception and the socket is blocking or has
+ a timeout. For non-blocking sockets, the method raises an
+ :exc:`InterruptedError` exception if the connection is interrupted by a
+ signal (or the exception raised by the signal handler).
+
+ .. versionchanged:: 3.5
+ The method now waits until the connection completes instead of raising an
+ :exc:`InterruptedError` exception if the connection is interrupted by a
+ signal, the signal handler doesn't raise an exception and the socket is
+ blocking or has a timeout (see the :pep:`475` for the rationale).
+
.. method:: socket.connect_ex(address)