diff -r 3be241de1630 -r 16454d63d4c2 TCP/TCPStream.m --- a/TCP/TCPStream.m Thu Jun 19 16:22:05 2008 -0700 +++ b/TCP/TCPStream.m Mon Jun 23 14:02:31 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 {