1
0
Fork 0
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:
badaix 2020-01-08 21:22:56 +01:00
parent a01f61b3c8
commit 7b268b83df
8 changed files with 30 additions and 39 deletions
server/streamreader

View file

@ -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";