Don't |-send:| if the transactions do not match
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 31 May 2010 23:06:26 +0000 (19:06 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 31 May 2010 23:06:26 +0000 (19:06 -0400)
Source/DebuggerConnection.m

index f971ce3a60304b699ba907b33fab22f96b06f99e..3ab0f444d9e2c7cbe472659c343177cfd56744d6 100644 (file)
@@ -607,7 +607,7 @@ void SocketAcceptCallback(CFSocketRef socket,
  */
 - (void)send:(NSString*)command
 {
-       if (CFWriteStreamCanAcceptBytes(writeStream_))
+       if (lastReadTransaction_ >= lastWrittenTransaction_ && CFWriteStreamCanAcceptBytes(writeStream_))
                [self performSend:command];
        else
                [queuedWrites_ addObject:command];