]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_rtmp: don't add data to the sendq if the connection's gone
authorMathieu Rene <mrene@avgs.ca>
Wed, 31 Aug 2011 13:38:05 +0000 (15:38 +0200)
committerMathieu Rene <mrene@avgs.ca>
Wed, 31 Aug 2011 14:46:20 +0000 (16:46 +0200)
src/mod/endpoints/mod_rtmp/rtmp_tcp.c

index b09cef7ad15d9f0f19a98c69cc618f41968dc6e3..62bb709b0184e5f5dd835fd81787aea4d2d74e0b 100644 (file)
@@ -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;