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
上级 7ee3dfe9
......@@ -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) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册