diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 399c45399c..c68180e9e8 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -322,6 +322,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s done: + if (status != SWITCH_STATUS_SUCCESS) { + rtp_session->ready = NULL; + } + if (new_sock) { switch_socket_close(new_sock); }