obs-outputs: Don't shutdown RTMP session when silently reconnecting
The silent reconnect (GOAWAY) is supposed to be used for switching the connection to a different server. As such, cleanly shutting down the RTMP connection can destroy state that needs to be preserved in order for the GOAWAY-enabled server to properly resume the same stream on reconnect. This commit closes the TLS/TCP connection before calling RTMP_Close, causing librtmp to skip the FCUnpublish and deleteStream messages.
This commit is contained in:
parent
aec31a9e6d
commit
dada82fec1
@ -708,6 +708,15 @@ static void *send_thread(void *data)
|
||||
}
|
||||
|
||||
set_output_error(stream);
|
||||
|
||||
if (silently_reconnecting(stream)) {
|
||||
/* manually close the socket to prevent librtmp from sending
|
||||
* unpublish / deletestream messages when we call RTMP_Close,
|
||||
* since we want to re-use this stream when we reconnect */
|
||||
RTMPSockBuf_Close(&stream->rtmp.m_sb);
|
||||
stream->rtmp.m_sb.sb_socket = -1;
|
||||
}
|
||||
|
||||
RTMP_Close(&stream->rtmp);
|
||||
|
||||
/* reset bitrate on stop */
|
||||
|
Loading…
x
Reference in New Issue
Block a user