ConnectionQueue + SharedQueue question???

John M McIntosh johnmci at smalltalkconsulting.com
Tue Oct 24 21:20:08 UTC 2000


>
>I added a Delay (forSeconds: 10) before beginning the receiving
>Process (an infinite loop using ConnectionQueue).  This seems to
>have eliminated the problem - INITIALLY.  Only to have the problem
>occur later.
>
>Any suggestions???
>
>---John

You  might want to call closeAndDestroy versus destroy. Destroy will 
abort the connection and terminate the socket without regard to 
pending outbound data, this may cause you to loose outbound data. 
closeAndDestroy will wait for the disconnect to occur, or 20 seconds 
which ever happens first. Also beware that on accepting the 
connection the socket might go into othersideclosed state versus 
connected based on timing. I think some of the code assumes that if 
the socket isn't in Connected state then it's game over. However it's 
quite reasonable to be in othersideclosed and have data pending to 
read.

So check both sides of the equation.


-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list