mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-04 03:41:43 +02:00
fixed connect problem
This commit is contained in:
parent
817755a8b7
commit
86a9b6ca90
2 changed files with 5 additions and 7 deletions
|
@ -64,14 +64,12 @@ private:
|
|||
void handleAccept(socket_ptr socket);
|
||||
// void acceptor();
|
||||
mutable std::mutex mutex_;
|
||||
size_t port_;
|
||||
std::set<std::shared_ptr<ControlSession>> sessions_;
|
||||
boost::asio::io_service* io_service_;
|
||||
std::shared_ptr<tcp::acceptor> acceptor_;
|
||||
|
||||
// std::thread acceptThread_;
|
||||
Queue<std::shared_ptr<msg::BaseMessage>> messages_;
|
||||
|
||||
boost::asio::io_service* io_service_;
|
||||
size_t port_;
|
||||
ControlMessageReceiver* controlMessageReceiver_;
|
||||
};
|
||||
|
||||
|
|
|
@ -133,12 +133,12 @@ int main(int argc, char* argv[])
|
|||
settings.sampleFormat = sampleFormat;
|
||||
|
||||
boost::asio::io_service io_service;
|
||||
auto func = [](boost::asio::io_service* ioservice)->void{ioservice->run();};
|
||||
std::thread t(func, &io_service);
|
||||
|
||||
std::unique_ptr<StreamServer> streamServer(new StreamServer(&io_service, settings));
|
||||
streamServer->start();
|
||||
|
||||
auto func = [](boost::asio::io_service* ioservice)->void{ioservice->run();};
|
||||
std::thread t(func, &io_service);
|
||||
|
||||
while (!g_terminated)
|
||||
usleep(100*1000);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue