Message8589

Author mb_
Recipients mb_
Date 2014-06-01.21:04:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401656686.97.0.952340730503.issue2157@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-06-01 21:04:47mb_setrecipients: + mb_
2014-06-01 21:04:46mb_setmessageid: <1401656686.97.0.952340730503.issue2157@psf.upfronthosting.co.za>
2014-06-01 21:04:46mb_linkissue2157 messages
2014-06-01 21:04:45mb_create