mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 08:06:41 +02:00
Fix crash during shutdown
In case there are multiple PosixStreams with the same name, the server crashed during shutdown
This commit is contained in:
parent
e12fa3fc7d
commit
062e46060c
4 changed files with 9 additions and 7 deletions
|
@ -143,15 +143,16 @@ const PcmStreamPtr StreamManager::getStream(const std::string& id)
|
|||
|
||||
void StreamManager::start()
|
||||
{
|
||||
for (auto stream : streams_)
|
||||
for (const auto& stream : streams_)
|
||||
stream->start();
|
||||
}
|
||||
|
||||
|
||||
void StreamManager::stop()
|
||||
{
|
||||
for (auto stream : streams_)
|
||||
stream->stop();
|
||||
for (const auto& stream : streams_)
|
||||
if (stream)
|
||||
stream->stop();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue