mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-09 23:26:47 +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
|
@ -799,10 +799,11 @@ void StreamServer::start()
|
|||
{
|
||||
try
|
||||
{
|
||||
controlServer_.reset(new ControlServer(io_context_, settings_.tcp, settings_.http, this));
|
||||
controlServer_ = std::make_unique<ControlServer>(io_context_, settings_.tcp, settings_.http, this);
|
||||
controlServer_->start();
|
||||
|
||||
streamManager_.reset(new StreamManager(this, io_context_, settings_.stream.sampleFormat, settings_.stream.codec, settings_.stream.streamChunkMs));
|
||||
streamManager_ =
|
||||
std::make_unique<StreamManager>(this, io_context_, settings_.stream.sampleFormat, settings_.stream.codec, settings_.stream.streamChunkMs);
|
||||
// throw SnapException("xxx");
|
||||
for (const auto& streamUri : settings_.stream.pcmStreams)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue