From: Mathieu Rene Date: Wed, 31 Aug 2011 13:38:05 +0000 (+0200) Subject: mod_rtmp: don't add data to the sendq if the connection's gone X-Git-Tag: v1.2-rc1~51^2~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=156776797a854539bdcc368b6642bc3044425209;p=thirdparty%2Ffreeswitch.git mod_rtmp: don't add data to the sendq if the connection's gone --- diff --git a/src/mod/endpoints/mod_rtmp/rtmp_tcp.c b/src/mod/endpoints/mod_rtmp/rtmp_tcp.c index b09cef7ad1..62bb709b01 100644 --- a/src/mod/endpoints/mod_rtmp/rtmp_tcp.c +++ b/src/mod/endpoints/mod_rtmp/rtmp_tcp.c @@ -143,7 +143,7 @@ static switch_status_t rtmp_tcp_write(rtmp_session_t *rsession, const unsigned c status = switch_socket_send_nonblock(io_pvt->socket, (char*)buf, len); - if (*len < orig_len) { + if (*len > 0 && *len < orig_len) { if (rsession->state >= RS_DESTROY) { return SWITCH_STATUS_FALSE;