Fixed stream connect during shutdown
This commit is contained in:
parent
b0bf1d14ec
commit
5ffd51e958
1 changed files with 9 additions and 2 deletions
|
@ -131,9 +131,16 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
|
|||
//Note: this uses the _whole_ stream name, including + (if any).
|
||||
//This means "test+a" and "test+b" have separate locks and do not interact with each other.
|
||||
if (streamAlive(streamname)){
|
||||
uint8_t streamStat = getStreamStatus(streamname);
|
||||
while (streamStat == STRMSTAT_SHUTDOWN){
|
||||
Util::sleep(250);
|
||||
streamStat = getStreamStatus(streamname);
|
||||
}
|
||||
if (streamStat != STRMSTAT_OFF){
|
||||
DEBUG_MSG(DLVL_MEDIUM, "Stream %s already active; continuing", streamname.c_str());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//Attempt to load up configuration and find this stream
|
||||
IPC::sharedPage mistConfOut(SHM_CONF, DEFAULT_CONF_PAGE_SIZE);
|
||||
|
|
Loading…
Add table
Reference in a new issue