Skip to content

Commit

Permalink
Restore resetting sequence_number in connect_send
Browse files Browse the repository at this point in the history
While it does not make sense to reset the sequence number in the middle
of parsing the handshake packet, it is reasonable to continue resetting
the sequence number once immediately when the connection is established.
As mentioned during review, this makes the send/recv of establishing the
connection similar to other send/recv pairs where the sequence number
gets reset during the send portion.
  • Loading branch information
skipkayhil committed May 8, 2024
1 parent cb788be commit 8b80fce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ int trilogy_connect_send_socket(trilogy_conn_t *conn, trilogy_sock_t *sock)
return rc;

conn->socket = sock;
conn->packet_parser.sequence_number = 0;

return TRILOGY_OK;
}

Expand Down

0 comments on commit 8b80fce

Please sign in to comment.