Commit 04711cd8 authored by Dennis van Amerongen's avatar Dennis van Amerongen

backport [23295] fix for proper automatic reconnect in shout module

parent a8c9e6b2
...@@ -342,6 +342,20 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer ) ...@@ -342,6 +342,20 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
{ {
msg_Err( p_access, "cannot write to stream: %s", msg_Err( p_access, "cannot write to stream: %s",
shout_get_error(p_access->p_sys->p_shout) ); shout_get_error(p_access->p_sys->p_shout) );
/* This can be caused by a server disconnect. Reconnecting might help... */
shout_close( p_access->p_sys->p_shout );
msg_Warn( p_access, "server unavailable? waiting 30 seconds to reconnect..." );
msleep( 30000000 );
if( shout_open( p_access->p_sys->p_shout ) == SHOUTERR_SUCCESS )
{
msg_Warn( p_access, "reconnected to server" );
}
else
{
msg_Err( p_access, "failed to reconnect to server" );
}
} }
block_Release( p_buffer ); block_Release( p_buffer );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment