Skip to content

Commit

Permalink
lib: connection - Reset handshake_received on connect
Browse files Browse the repository at this point in the history
A connection object can be reused, and so handshake_received
need to be reset to FALSE on connection to avoid panic.

Fixes Panic: file connection.c: line 169 (connection_input_line_default): assertion failed: (conn->version_received)
  • Loading branch information
cmouse committed Jan 28, 2019
1 parent 19313d7 commit a83fa0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/connection.c
Expand Up @@ -220,6 +220,7 @@ static void connection_init_streams(struct connection *conn)
i_assert(conn->output == NULL);
i_assert(conn->to == NULL);

conn->handshake_received = FALSE;
conn->version_received = set->major_version == 0;

if (set->input_max_size != 0) {
Expand Down

0 comments on commit a83fa0a

Please sign in to comment.