-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Alerts] Fix alert handler segfault on lt.pop_alerts
We cannot handle an alert after calling lt.pop_alerts for a subsequent time since the alert objects are invalidated and with cause a segfault. To resolve this issue add a timeout to the handler calls and wait in the alert thread for either the handlers to be called or eventually be cancelled before getting more alerts. This is still not an ideal solution and might leave to backlog of alerts but this is better than crashing the application. Perhaps the timeout could be tweaked to be shorter for certain alert types such as stats. Related: arvidn/libtorrent#6437
- Loading branch information
Showing
1 changed file
with
29 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters