Skip to content

Conversation

@hunterZh37
Copy link

I previous wrongly implemented TCPSenderMessage TCPSender::make_empty_message() with the following implementation because I thought you had to RST when you send an empty message & this passed all the tests!

TCPSenderMessage TCPSender::make_empty_message() const
{
  TCPSenderMessage sender_message {};
  sender_message.seqno = Wrap32::wrap( next_abs_seqno_, isn_ );
  sender_message.RST = true; // WRONG! Should rather be sender_message.RST = reader().has_error();
  return sender_message;
}

After studying, I realized that the correct implementation should be: sender_message.RST = reader().has_error();

That means the current test case is always expecting RST to be true when make_empty_message() is called, but this should not be the case because RST should only be true when reader().has_error() is true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant