diff -r 16454d63d4c2 -r f240f9023393 BLIP/BLIPConnection.m --- a/BLIP/BLIPConnection.m Mon Jun 23 14:02:31 2008 -0700 +++ b/BLIP/BLIPConnection.m Thu Jul 02 17:51:35 2009 -0700 @@ -121,6 +121,12 @@ - (BLIPResponse*) sendRequest: (BLIPRequest*)request { + if (!request.isMine || request.sent) { + // This was an incoming request that I'm being asked to forward or echo; + // or it's an outgoing request being sent to multiple connections. + // Since a particular BLIPRequest can only be sent once, make a copy of it to send: + request = [[request mutableCopy] autorelease]; + } BLIPConnection *itsConnection = request.connection; if( itsConnection==nil ) request.connection = self; @@ -187,9 +193,9 @@ #pragma mark - @implementation BLIPListener -- (id) initWithPort: (UInt16)port +- (id) init { - self = [super initWithPort: port]; + self = [super init]; if (self != nil) { self.connectionClass = [BLIPConnection class]; }