librtmp
librtmp copied to clipboard
fix bug: infinite call when call RTMP_Close
I found the system will crash when I’m streaming and I shutdown the rtmp server application. So I began to debug and I found in this situation the WriteN function will call the RTMP_Close when the connection is broken, RTMP_Close calling will go into a infinite calling, because I found The RTMP_Close will call the SendFCUnpublish function or SendDeleteStream function, and these two function will both call the RTMP_SendPacket function and RTMP_SendPacket will can the WriteN function to send the data through socket.. As the server application has been closed, The calling of the WriteN will return a error result, and calling the RTMP_Close function again . So these operations above will make it a infinite loop. So I wander is there any design problem in this code? I don’t know if I have make myself clear.