Commit 15db11c0 authored by Marko Mikulicic's avatar Marko Mikulicic Committed by Cesanta Bot

Fix tunnel teardown

PUBLISHED_FROM=2c23e4a4dfc7129da657c5935f06335fc022394a
parent 97fe505b
......@@ -3998,9 +3998,11 @@ void mg_tun_if_destroy_conn(struct mg_connection *nc) {
uint32_t stream_id = (uint32_t)(uintptr_t) nc->mgr_data;
struct mg_str msg = {NULL, 0};
LOG(LL_DEBUG, ("closing %zu:", stream_id));
mg_tun_send_frame(client->disp, stream_id, MG_TUN_DATA_FRAME,
MG_TUN_F_END_STREAM, msg);
if (client->disp) {
LOG(LL_DEBUG, ("closing %zu:", stream_id));
mg_tun_send_frame(client->disp, stream_id, MG_TUN_DATA_FRAME,
MG_TUN_F_END_STREAM, msg);
}
}
/* Associate a socket to a connection. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment