Commit 5e0cc0a7 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

LocationListeners are triggered periodically, c.f. API doc

parent 4d2fbe7a
......@@ -360,12 +360,9 @@ public class DefaultTopologyComponent implements TopologyComponent {
if (!listeners.isEmpty()) {
// Only reschedule, if at least one listener is ... listening
Location newLoc = getLastLocation();
if (lastLocation == null
|| lastLocation.distanceTo(newLoc) > 0) {
listeners.forEach((LocationListener listener) -> listener
listeners.forEach((LocationListener listener) -> listener
.onLocationChanged(getHost(), newLoc));
lastLocation = newLoc;
}
lastLocation = newLoc;
Event.scheduleWithDelay(interval, this, null, 0);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment