Discussion:
[libtorrent] Question regarding metadata_received_alert
M***@massaroddel.de
2016-03-06 07:14:40 UTC
Permalink
Sometimes i receive metadata_received_alert alerts and the torrent handle is NULL. I think
the reason for this is that i removed the torrent from the session before the alert gets
processed by my client.
My question is: Is that the intended behavior or should the torrent (handle) stay valid until all
alerts regarding this torrent have been released?

MassaRoddel
------------------------------------------------------------------------------
Arvid Norberg
2016-03-06 15:06:17 UTC
Permalink
Post by M***@massaroddel.de
Sometimes i receive metadata_received_alert alerts and the torrent handle is NULL. I think
the reason for this is that i removed the torrent from the session before the alert gets
processed by my client.
My question is: Is that the intended behavior or should the torrent
(handle) stay valid until all
alerts regarding this torrent have been released?
It is the intended behavior. torrent_handle is fundamentally a weak_ptr to
the torrent object. I think it would be risky to make alerts hold an owning
reference to torrents
--
Arvid Norberg
------------------------------------------------------------------------------
Loading...