Bail out of compensate_dropped if no events were dropped

This commit is contained in:
Corey Richardson 2017-05-28 17:52:38 -04:00
parent fc27acc715
commit 591d1428c2
No known key found for this signature in database
GPG key ID: A89E9F8FB71E9B8B

View file

@ -838,6 +838,8 @@ impl Device {
} }
} }
self.pending_events.truncate(prev_report); self.pending_events.truncate(prev_report);
} else {
return Ok(())
} }
// Alright, pending_events is in a sane state. Now, let's sync the local state. We will // Alright, pending_events is in a sane state. Now, let's sync the local state. We will