ftp: Don't assert on a valid connection handle in Read()

When seeking, if the reconnection fails, the connection handle will be
NULL. Instead, try to reconnect and signal EOF if this can't be done.
This commit is contained in:
Hugo Beauzée-Luyssen 2018-03-08 13:45:19 +01:00
parent 733612862b
commit dde0b69477
1 changed files with 2 additions and 1 deletions

View File

@ -900,7 +900,8 @@ static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
assert( p_sys->data != NULL );
if( p_sys->data == NULL )
return 0;
assert( !p_sys->out );
ssize_t i_read = vlc_tls_Read( p_sys->data, p_buffer, i_len, false );