From: Michael Büsch <report@bu...> - 2014-06-01 21:04:54
New submission from Michael Büsch:
My application switches between blocking and nonblocking mode of a socket with the socket.settimeout() method. The documentation says this:
> Setting a timeout of None disables
> the timeout feature and is equivalent to setblocking(1).
> Setting a timeout of zero is the same as setblocking(0).
The application frequently switches between timeout=any_value, timeout=0 and timeout=None while it is running.
So I do not call setblocking().
This works on CPython 2.7.
However on Jython it does not. It results in various weird timeout issues.
As a workaround, I added a setblocking(True) call just before the first settimeout(None) call at application startup. This fixes the issue. But according to the documentation, it seems redundant.
I was unable to cook up a simple test script, as I'm not completely sure where the root of the problem is, yet.
title: socket blocking/nonblocking/timeout issue
versions: Jython 2.7
Jython tracker <report@...>
Get latest updates about Open Source Projects, Conferences and News.