help with Socket>>isOtherEndConnected

Michael Fremont mike at zorch.com
Thu Sep 20 00:45:59 UTC 2001


Hi all,

I'm a squeak newbie esp. wrt sockets.  I have a telnet connection open to 
squeak and run this code on the connected socket:

(Delay forSeconds:10) wait.
socket isOtherEndConnected
	ifTrue: socket sendData: 'hi there'.

This works, including if I close the other end before I get to this code (no 
send is then attempted).

But the following code gets a debug message, 'send data timeout; data not 
sent' when I close the other end well before the test:

10 timesRepeat:
	[
	(Delay forSeconds:10)wait.	
	socket isOtherEndConnected
		ifTrue: socket sendData: 'hi there'.
	]

I'm going bonkers trying to figure this out.  With tests of various 
permutations the failure seems to happen anytime the test is inside a block. 

I am running RedHat Linux 7.1, squeak vm 3.0pre2 and image updated to #4343.  
I get the same result with the latest vm compiled from Lex Spoon's patches 
page.

 Any ideas?

Thanks in advance,

Mike




More information about the Squeak-dev mailing list