mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 16:16:42 +02:00
clean up
This commit is contained in:
parent
a221e431aa
commit
87ce37df8c
5 changed files with 11 additions and 80 deletions
|
@ -120,30 +120,14 @@ void ControlServer::start()
|
|||
{
|
||||
acceptor_ = make_shared<tcp::acceptor>(*io_service_, tcp::endpoint(tcp::v4(), port_));
|
||||
startAccept();
|
||||
// acceptThread_ = thread(&ControlServer::acceptor, this);
|
||||
}
|
||||
|
||||
|
||||
void ControlServer::stop()
|
||||
{
|
||||
acceptor_->cancel();
|
||||
// io_service_.stop();
|
||||
/* try
|
||||
{
|
||||
acceptThread_.join();
|
||||
}
|
||||
catch(const exception& e)
|
||||
{
|
||||
logO << "ControlServer::stop exception: " << e.what() << "\n";
|
||||
}
|
||||
*/ std::unique_lock<std::mutex> mlock(mutex_);
|
||||
std::unique_lock<std::mutex> mlock(mutex_);
|
||||
for (auto it = sessions_.begin(); it != sessions_.end(); ++it)
|
||||
(*it)->stop();
|
||||
}
|
||||
|
||||
|
||||
//void ControlServer::acceptor()
|
||||
//{
|
||||
// io_service_.run();
|
||||
//}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue