提交 a1fff59c authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-7132

上级 3242dc58
......@@ -1113,6 +1113,7 @@ static void attach_jsock(jsock_t *jsock)
switch_core_hash_delete(globals.jsock_hash, jsock->uuid_str);
ws_write_json(jp, &msg, SWITCH_TRUE);
cJSON_Delete(msg);
jp->nodelete = 1;
jp->drop = 1;
}
}
......@@ -1126,6 +1127,10 @@ static void attach_jsock(jsock_t *jsock)
static void detach_jsock(jsock_t *jsock)
{
if (jsock->nodelete) {
return;
}
switch_mutex_lock(globals.jsock_mutex);
switch_core_hash_delete(globals.jsock_hash, jsock->uuid_str);
switch_mutex_unlock(globals.jsock_mutex);
......
......@@ -112,7 +112,8 @@ struct jsock_s {
struct passwd pw;
#endif
int drop;
uint8_t drop;
uint8_t nodelete;
ws_socket_t local_sock;
SSL *ssl;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论