Closed aldenml closed 7 years ago
Yeah, there are definitely problems with dangling pointers to session_listen_socket
here. I need to add code to go through the tracker manager and clear out all references to a socket when it is removed, like is done in dht_tracker
.
Thinking about it a little more, I think it might be better to bite the bullet and store listen_socket_t
in a shared_ptr
. We would then use weak_ptr
instead of raw pointers to session_listen_socket
. I had thought I could avoid that overhead without too much trouble, but between this and the previous crash failures with the DHT it seems I was wrong.
In case you are working on this, I'm giving it a try, but I'm a little lost in the cleanup part. Do you prefer that I wait?
I've started working on it. I have a good idea of what I wan to do so you can hold off.
thanks!
For what I see in my logs, the problem seems fixed, closing this (and for reopen is something related reappears)
libtorrent version (or branch):
master
platform/architecture:android/arm
but possibleall
Hi @ssiloti, now I'm able to see crashes like this:
and
I think the problem is that
tracker_request::outgoing_socket
is assigned like this:and that address becomes invalid when
reopen_listen_sockets
remove it.Do you think this is a potential problem? If yes, not clear to me how to address it