diff -r 3be241de1630 -r 8efb48eabd08 BLIP/BLIPConnection.m --- a/BLIP/BLIPConnection.m Thu Jun 19 16:22:05 2008 -0700 +++ b/BLIP/BLIPConnection.m Sun May 10 19:00:50 2009 -0700 @@ -8,6 +8,7 @@ #import "BLIPConnection.h" #import "BLIP_Internal.h" +#import "TCP_Internal.h" #import "BLIPReader.h" #import "BLIPWriter.h" #import "BLIPDispatcher.h" @@ -153,8 +154,8 @@ NSError *error = response.error; LogTo(BLIPVerbose,@"Received close response: error=%@",error); if( error ) { - if( [_delegate respondsToSelector: @selector(connection:closeRequestFailedWithError:)] ) - [_delegate connection: self closeRequestFailedWithError: error]; + [self _unclose]; + [self tellDelegate: @selector(connection:closeRequestFailedWithError:) withObject: error]; } else { // Now finally close the socket: [super _beginClose];