mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-15 18:16:44 +02:00
Fix crash in TCP stream disconnect
This commit is contained in:
parent
5c1f35d6db
commit
a625a5d806
1 changed files with 3 additions and 2 deletions
|
@ -45,7 +45,7 @@ TcpStream::TcpStream(PcmListener* pcmListener, boost::asio::io_context& ioc, con
|
|||
}
|
||||
|
||||
LOG(INFO) << "TcpStream port: " << port << "\n";
|
||||
acceptor_ = make_unique<tcp::acceptor>(ioc_, tcp::endpoint(tcp::v4(), port));
|
||||
acceptor_ = make_unique<tcp::acceptor>(ioc_, tcp::endpoint(boost::asio::ip::address::from_string(uri_.host), port));
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,5 +69,6 @@ void TcpStream::connect()
|
|||
|
||||
void TcpStream::disconnect()
|
||||
{
|
||||
if (stream_)
|
||||
stream_->close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue