[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Freeipa-devel] Wrong timeout parameter in ipapython

Hash: SHA1

On 03/11/2011 04:44 AM, Rob Crittenden wrote:
> Sylvain Baubeau wrote:
>>    Hi,
>> I was facing an error with ipapython that caused an NSPRError
>> exception to
>> be raised at line 159 of ipapython/nsslib.py :
>> 157                 logging.debug("connecting: %s", net_addr)
>> 158                 try:
>> 159                     self.sock.connect(net_addr, family)
>> 160                 except Exception, e:
>> 161                     logging.debug("Could not connect socket to %s,
>> error: %s, retrying..",
>> 162                                   net_addr, str(e))
>> The error message was : [Errno -5990] (PR_IO_TIMEOUT_ERROR) I/O operation
>> timed out.
>> It seems like the second argument to 'connect' is a timeout, not the
>> socket family. I attached a patch that just removes the second argument.
>> Or am I missing something ?
>> Regards
>> Sylvain Baubeau
> I'll do a full review tomorrow but it looks like you are correct, this
> is timeout not family. Under what conditions were you getting the
> timeout? Are you using IPv4 or IPv6 addresses?
> thanks
> rob

Sylvain's patch is correct, Ack.

The address family is correctly passed during socket creation. It should
not be used during connection. The code worked for us by accident only
as the family is an integer, too.

Since he's getting timeouts, I'm guessing he's using IPv4 because
AF_INET = 4, AF_INET6 = 10.
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]