Input now prints message and aborts cleanly when pull lock could not be opened.
This commit is contained in:
parent
422c839ae2
commit
24a1744b7e
1 changed files with 4 additions and 0 deletions
|
@ -284,6 +284,10 @@ namespace Mist {
|
|||
void Input::stream(){
|
||||
IPC::semaphore pullLock;
|
||||
pullLock.open(std::string("/MstPull_" + streamName).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
||||
if (!pullLock){
|
||||
FAIL_MSG("Could not open pull lock for stream '%s' - aborting!", streamName.c_str());
|
||||
return;
|
||||
}
|
||||
if (!pullLock.tryWait()){
|
||||
WARN_MSG("A pull process for stream %s is already running", streamName.c_str());
|
||||
pullLock.close();
|
||||
|
|
Loading…
Add table
Reference in a new issue