Merge pull request #1608 from mattdurant/issue_1590

Added check for SINGLE_IMAGE to ignore socket closed by remote side
pull/1617/head
Isaac Connor 2016-09-01 12:30:47 -04:00 committed by GitHub
commit 21431a5733
1 changed files with 2 additions and 0 deletions

View File

@ -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" );