Skip to content

Commit 05cc46c

Browse files
committed
DISPATCH-1979: Additional fix, clean session data after conn config has been set to zero
1 parent 6f82fe7 commit 05cc46c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/adaptors/http2/http2_adaptor.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,14 +2172,13 @@ static void handle_disconnected(qdr_http2_connection_t* conn)
21722172
{
21732173
sys_mutex_lock(qd_server_get_activation_lock(http2_adaptor->core->qd->server));
21742174

2175-
clean_session_data(conn);
2176-
21772175
if (conn->pn_raw_conn) {
21782176
qd_log(http2_adaptor->log_source, QD_LOG_TRACE, "[C%"PRIu64"] Setting conn->pn_raw_conn=0", conn->conn_id);
21792177
conn->pn_raw_conn = 0;
21802178
}
21812179

21822180
if (conn->ingress) {
2181+
clean_session_data(conn);
21832182
close_connections(conn);
21842183
}
21852184
else {
@@ -2195,11 +2194,16 @@ static void handle_disconnected(qdr_http2_connection_t* conn)
21952194
}
21962195
conn->stream_dispatcher_stream_data = 0;
21972196

2198-
if (conn->delete_egress_connections) {
2199-
// The config has already been freed by the qd_http_connector_decref() function, set it to zero here
2200-
conn->config = 0;
2201-
close_connections(conn);
2202-
}
2197+
}
2198+
if (conn->delete_egress_connections) {
2199+
// The config has already been freed by the qd_http_connector_decref() function, set it to zero here
2200+
conn->config = 0;
2201+
// It is important that clean_session_data be called *after* the conn->config has been set to zero
2202+
clean_session_data(conn);
2203+
close_connections(conn);
2204+
}
2205+
else {
2206+
clean_session_data(conn);
22032207
}
22042208
}
22052209
sys_mutex_unlock(qd_server_get_activation_lock(http2_adaptor->core->qd->server));

0 commit comments

Comments
 (0)