`http_connection::on_connect` and the shutdown
elgatito opened this issue · comments
Hello,
I've noticed that sometimes, when I destroy the session, it hangs for around 130 seconds and then succeed to restroy it.
I've enabled debugging flag -DTORRENT_ASIO_DEBUGGING=1
and it showed that it is waiting for http_connection::on_connect
.
This is on RC_1_1 (yes, yes, old one).
The test is simply to start an empty session, then add a torrent, remove a torrent and destroy the session.
So when I destroy the session - there are no added torrents at that moment, session is empty.
I don't know if session::abort()
can be safely called, but if I run it before destroying the session - it does not hang.
@arvidn Not sure if never RC_1_2 and RC_2_0 have any changes there.
I think I've got also blocked destruction when I was not adding any torrent.
Before I destroy a session - I stop all services (DHT, UPNP, LSD, etc).
@arvidn So, generally, the question is, whether it is safe to call session::abort()
, with torrents in the session, or without torrents?
Same question related to RC1_2
branch, whether it is safe to call session::abort()
when I dropped all torrents from the session.