librtmp: Remove reconnect on close behavior

For some reason librtmp treats a close message as a request to reconnect.
It does this syncronously, and uses the same event processing so that
another close request will continue the cycle until the stack is exhausted
and the application crashes.

Fixes https://obsproject.com/mantis/view.php?id=634
master
Richard Stanway 2016-09-27 00:23:39 +02:00
parent 7ee3dfe9e4
commit 4d23e84837
No known key found for this signature in database
GPG Key ID: AAC1E5265D71B3FD
1 changed files with 4 additions and 1 deletions

View File

@ -3104,7 +3104,10 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
{
RTMP_Log(RTMP_LOGERROR, "rtmp server requested close");
RTMP_Close(r);
#if defined(CRYPTO) || defined(USE_ONLY_MD5)
// disabled this for now, if the server sends an rtmp close message librtmp
// will enter an infinite loop here until stack is exhausted.
#if 0 && (defined(CRYPTO) || defined(USE_ONLY_MD5))
if ((r->Link.protocol & RTMP_FEATURE_WRITE) &&
!(r->Link.pFlags & RTMP_PUB_CLEAN) &&
( !(r->Link.pFlags & RTMP_PUB_NAME) ||