forked from Mirrors/freeswitch
fix seg when mod unload with event_sink listeners present
This commit is contained in:
parent
dba6530eb5
commit
1ce96ce9f5
@ -598,6 +598,8 @@ static void send_disconnect(listener_t *listener, const char *message)
|
|||||||
switch_snprintf(disco_buf, sizeof(disco_buf), "Content-Type: text/disconnect-notice\nContent-Length: %d\n\n", mlen);
|
switch_snprintf(disco_buf, sizeof(disco_buf), "Content-Type: text/disconnect-notice\nContent-Length: %d\n\n", mlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!listener->sock) return;
|
||||||
|
|
||||||
len = strlen(disco_buf);
|
len = strlen(disco_buf);
|
||||||
switch_socket_send(listener->sock, disco_buf, &len);
|
switch_socket_send(listener->sock, disco_buf, &len);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user