Added check for SINGLE_IMAGE if ReadData() detects the socket closed by remote side to return 0 instead of -1.
This commit is contained in:
parent
3320ad24ea
commit
350352d956
|
@ -192,6 +192,8 @@ int RemoteCameraHttp::ReadData( Buffer &buffer, int bytes_expected )
|
|||
|
||||
if ( total_bytes_to_read == 0 )
|
||||
{
|
||||
if( mode == SINGLE_IMAGE )
|
||||
return( 0 );
|
||||
// If socket is closed locally, then select will fail, but if it is closed remotely
|
||||
// then we have an exception on our socket.. but no data.
|
||||
Debug( 3, "Socket closed remotely" );
|
||||
|
|
Loading…
Reference in New Issue