Skip to content

Commit

Permalink
[apps] Fix too premature stopped reading in srt-file-transmit (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethouris authored Feb 3, 2021
1 parent 7d99b80 commit 64edcf6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/srt-file-transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,14 @@ bool DoDownload(UriParser& us, string directory, string filename,
}
}
break;

// No need to do any special action in case of broken.
// The app will just try to read and in worst case it will
// get an error.
case SRTS_BROKEN:
cerr << "Connection closed, reading buffer remains\n";
break;

case SRTS_NONEXIST:
case SRTS_CLOSED:
{
Expand Down Expand Up @@ -601,7 +608,7 @@ bool DoDownload(UriParser& us, string directory, string filename,
if (n == 0)
{
result = true;
cerr << "Download COMPLETE.";
cerr << "Download COMPLETE.\n";
break;
}

Expand Down

0 comments on commit 64edcf6

Please sign in to comment.