diff -r 3be241de1630 -r 8b883753394a TCP/TCPStream.m --- a/TCP/TCPStream.m Thu Jun 19 16:22:05 2008 -0700 +++ b/TCP/TCPStream.m Sun Jul 13 10:42:50 2008 -0700 @@ -121,17 +121,24 @@ - (BOOL) close { - _shouldClose = YES; + if( ! _shouldClose ) { + _shouldClose = YES; + LogTo(TCP,@"Request to close %@",self); + } if( self.isBusy ) { return NO; } else { - LogTo(TCP,@"Request to close %@",self); [[self retain] autorelease]; // don't let myself be dealloced in the midst of this [_conn _streamCanClose: self]; return YES; } } +- (void) _unclose +{ + _shouldClose = NO; +} + - (BOOL) isOpen {