mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-02 02:41:49 +02:00
Remove unused shared_from_this
This commit is contained in:
parent
a01f61b3c8
commit
7b268b83df
8 changed files with 30 additions and 39 deletions
server/streamreader
|
@ -68,11 +68,9 @@ void TcpStream::do_connect()
|
|||
if (!active_)
|
||||
return;
|
||||
|
||||
auto self = shared_from_this();
|
||||
|
||||
if (is_server_)
|
||||
{
|
||||
acceptor_->async_accept([this, self](boost::system::error_code ec, tcp::socket socket) {
|
||||
acceptor_->async_accept([this](boost::system::error_code ec, tcp::socket socket) {
|
||||
if (!ec)
|
||||
{
|
||||
LOG(DEBUG) << "New client connection\n";
|
||||
|
@ -89,7 +87,7 @@ void TcpStream::do_connect()
|
|||
{
|
||||
stream_ = make_unique<tcp::socket>(ioc_);
|
||||
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::address::from_string(host_), port_);
|
||||
stream_->async_connect(endpoint, [self, this](const boost::system::error_code& ec) {
|
||||
stream_->async_connect(endpoint, [this](const boost::system::error_code& ec) {
|
||||
if (!ec)
|
||||
{
|
||||
LOG(DEBUG) << "Connected\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue