Skip to content

Commit

Permalink
Fixed #109 by including only newer commands in poll
Browse files Browse the repository at this point in the history
  • Loading branch information
demon-xxi committed Oct 12, 2015
1 parent 42ed91f commit 638f983
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ private void getOrWaitForCommands(HivePrincipal principal, final String devices,
if (timestamp != null) {
list = commandService.find(deviceGuids, commandNames, timestamp, null, Constants.DEFAULT_TAKE, false, principal);
}
// polling expects only commands after timestamp to be returned
list.removeIf(c -> !c.getTimestamp().after(timestamp));

if (!list.isEmpty()) {
Response response;
Expand Down

0 comments on commit 638f983

Please sign in to comment.