TCP/TCPStream.m
changeset 22 8b883753394a
parent 18 3be241de1630
child 26 cb9cdf247239
     1.1 --- a/TCP/TCPStream.m	Thu Jun 19 16:22:05 2008 -0700
     1.2 +++ b/TCP/TCPStream.m	Sun Jul 13 10:42:50 2008 -0700
     1.3 @@ -121,17 +121,24 @@
     1.4  
     1.5  - (BOOL) close
     1.6  {
     1.7 -    _shouldClose = YES;
     1.8 +    if( ! _shouldClose ) {
     1.9 +        _shouldClose = YES;
    1.10 +        LogTo(TCP,@"Request to close %@",self);
    1.11 +    }
    1.12      if( self.isBusy ) {
    1.13          return NO;
    1.14      } else {
    1.15 -        LogTo(TCP,@"Request to close %@",self);
    1.16          [[self retain] autorelease];        // don't let myself be dealloced in the midst of this
    1.17          [_conn _streamCanClose: self];
    1.18          return YES;
    1.19      }
    1.20  }
    1.21  
    1.22 +- (void) _unclose
    1.23 +{
    1.24 +    _shouldClose = NO;
    1.25 +}
    1.26 +
    1.27  
    1.28  - (BOOL) isOpen
    1.29  {