Commit 934231ee authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

http: simplify reconnect

parent 6558f6e8
...@@ -654,17 +654,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -654,17 +654,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
{ {
msg_Dbg( p_access, "got disconnected, trying to reconnect" ); msg_Dbg( p_access, "got disconnected, trying to reconnect" );
if( Connect( p_access, p_sys->offset ) ) if( Connect( p_access, p_sys->offset ) )
{
msg_Dbg( p_access, "reconnection failed" ); msg_Dbg( p_access, "reconnection failed" );
}
else else
{ return -1;
p_sys->b_reconnect = false;
i_read = Read( p_access, p_buffer, i_len );
p_sys->b_reconnect = true;
return i_read;
}
} }
if( i_read <= 0 ) if( i_read <= 0 )
......
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