[New-bugs-announce] [issue15215] socket module setblocking and settimeout problem

Frank Ling report at bugs.python.org
Thu Jun 28 09:26:19 CEST 2012

New submission from Frank Ling <ufwtlsb at gmail.com>:

i use socket such as :
but this socket is no-block ,i find socketmodule.c sock_settimeout

    s->sock_timeout = timeout;
    internal_setblocking(s, timeout < 0.0);

if timeout >0, so internal_setblocking(s,false=0),so socket is no-block

by the way:
  in sock_settimeout,call internal_setblocking params have error?

    if (defaulttimeout >= 0.0)
        internal_setblocking(s, 0);

messages: 164225
nosy: Frank.Ling
priority: normal
severity: normal
status: open
title: socket module setblocking and settimeout problem
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list