Socket>>#waitForDataFor:ifClosed:ifTimedOut: large delay hangs
rootbeer at redcat.com
Tue Jan 15 01:59:39 UTC 2008
On Jan 14, 2008 12:58 PM, <squeakdev1 at reider.net> wrote:
> ,> In 3.10 there is a timeout calculating function which does take roll
> over into account.
> Can you tell me where that is?
I don't know about that one, but here's the fix I've put into the
method in my own image, for what it's worth. Just add the variable
waitFor at the top of the method, and then at the right place:
waitFor := deadline - Time millisecondClockValue.
waitFor > 300000 "300 seconds = 5 minutes"
"msec clock rolled over"
deadline := 0]
self readSemaphore waitTimeoutMSecs: waitFor] ].
This code handles the clock rollover somewhat more gracefully. Good
luck with it!
More information about the Squeak-dev