Added check for removed data page during data ingest, shuts down binary to prevent crash
This commit is contained in:
parent
19a55828a3
commit
b4b76850e3
1 changed files with 10 additions and 0 deletions
10
src/io.cpp
10
src/io.cpp
|
@ -8,6 +8,7 @@
|
|||
#include <mist/langcodes.h> //LTS
|
||||
#include <mist/stream.h>
|
||||
#include <mist/h264.h>
|
||||
#include <mist/config.h>
|
||||
|
||||
namespace Mist{
|
||||
InOutBase::InOutBase() : M(meta){}
|
||||
|
@ -404,6 +405,15 @@ namespace Mist{
|
|||
return;
|
||||
}
|
||||
|
||||
if (curPage.count(packTrack) && !curPage[packTrack].exists()){
|
||||
WARN_MSG("Data page was deleted - forcing source shutdown to prevent unstable state");
|
||||
Util::logExitReason("data page was deleted, forcing shutdown to prevent unstable state");
|
||||
bufferFinalize(packTrack);
|
||||
kill(getpid(), SIGINT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!curPageNum.count(packTrack) || nextPageNum != curPageNum[packTrack]){
|
||||
if (curPageNum.count(packTrack)){
|
||||
// Close the currently opened page when it exists
|
||||
|
|
Loading…
Add table
Reference in a new issue