summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-09 08:23:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-04-09 08:23:12 (GMT)
commit88ed640fc7aec18c6148525801186264ebef8a75 (patch)
tree95b04e27c6f3fa2fd2c91531e352d60ab06759c4 /Modules/socketmodule.c
parentda5cbe65ae2cf43164ce4ba8e3b47d7b8c15c013 (diff)
downloadcpython-88ed640fc7aec18c6148525801186264ebef8a75.zip
cpython-88ed640fc7aec18c6148525801186264ebef8a75.tar.gz
cpython-88ed640fc7aec18c6148525801186264ebef8a75.tar.bz2
Issue #23834: Fix the default socket timeout
Use -1 second by default, not -1 nanosecond.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 1ecec5a..8c5c36c 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -839,7 +839,8 @@ sock_call(PySocketSockObject *s,
/* Initialize a new socket object. */
-static _PyTime_t defaulttimeout = -1; /* Default timeout for new sockets */
+/* Default timeout for new sockets */
+static _PyTime_t defaulttimeout = _PYTIME_FROMSECONDS(-1);
static void
init_sockobject(PySocketSockObject *s,