Skip to content

Commit

Permalink
Merge pull request #184 from skipkayhil/hm-no-seq-reset-on-connect
Browse files Browse the repository at this point in the history
Fix "Got packets our of order" errors on connect
  • Loading branch information
eileencodes authored May 8, 2024
2 parents 1b5c43b + 8b80fce commit 3703624
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,13 @@ 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;
}

int trilogy_connect_recv(trilogy_conn_t *conn, trilogy_handshake_t *handshake_out)
{
// reset the sequence number with each connect recv attempt
conn->packet_parser.sequence_number = 0;

int rc = read_packet(conn);

if (rc < 0) {
Expand Down

0 comments on commit 3703624

Please sign in to comment.