Merge "adb: properly erase destroyed jdwp_trackers."

This commit is contained in:
Treehugger Robot 2017-03-10 20:54:50 +00:00 committed by Gerrit Code Review
commit e02eba8fd2

View file

@ -571,7 +571,8 @@ static void jdwp_tracker_close(asocket* s) {
remove_socket(s);
auto pred = [s](const auto& tracker) { return tracker.get() == s; };
std::remove_if(_jdwp_trackers.begin(), _jdwp_trackers.end(), pred);
_jdwp_trackers.erase(std::remove_if(_jdwp_trackers.begin(), _jdwp_trackers.end(), pred),
_jdwp_trackers.end());
}
static void jdwp_tracker_ready(asocket* s) {