fixed deadlock in server shutdown

This commit is contained in:
badaix 2016-11-09 11:45:35 +01:00
parent 341466ceb5
commit 935899b0a2
5 changed files with 35 additions and 23 deletions

View file

@ -185,10 +185,12 @@ void ProcessStream::worker()
}
while ((len < toRead) && active_);
if (!active_)
break;
if (!active_) break;
encoder_->encode(chunk.get());
if (!active_) break;
nextTick += pcmReadMs_;
chronos::addUs(tvChunk, pcmReadMs_ * 1000);
long currentTick = chronos::getTickCount();