fix seg when mod unload with event_sink listeners present

This commit is contained in:
Seven Du 2013-03-21 12:58:15 +08:00
parent dba6530eb5
commit 1ce96ce9f5

View File

@ -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);
}
if (!listener->sock) return;
len = strlen(disco_buf);
switch_socket_send(listener->sock, disco_buf, &len);
if (len > 0) {