[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 :
        self.socket.setblocking(1)
        self.socket.settimeout(1)
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?

init_sockobject:
    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>
<http://bugs.python.org/issue15215>
_______________________________________


More information about the New-bugs-announce mailing list