$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [asio] Connection not ending
From: Markus Bonk (markus_bonk_at_[hidden])
Date: 2012-05-10 09:28:54
I am still not there yet. To close the socket I need to keep a
reference/shared_ptr to the connection somewhere. Which basically means I
have two shared_ptrs. If a handler reports an error the connection needs to
know something about the manager/state machine/whatever to tell it it is
closing down, right?
"Igor R" wrote in message
news:CAPnv1PKuZ5kDbif8Z73V2RePhYb7e5Oth4ZuF8sW7+NYLgvNaw_at_mail.gmail.com...
> I don't really see how this changes things. The handlers which io_service
> has, has shared_ptrs to the connection so to get rid of the connection I
> need to get the io_service to call the handler so that the shared_ptr gets
> destroyed, or am I missing something?
Yes, after you close the socket, all the relevant handlers will be
invoked and disposed.