Skip to content

Commit

Permalink
Trivial: Use createTimer for Client gossip timer
Browse files Browse the repository at this point in the history
It is immediately stopped after setting, `createTimer` is more suitable
for those conditions.
  • Loading branch information
Muhammed Kadir Yücel authored and hewison-chris committed Apr 18, 2022
1 parent 1e9b146 commit 03f36b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/agora/network/Client.d
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ public class NetworkClient
this.exception = new Exception(
format("Request failure after %s attempts", max_retries));
// Create and stop timer immediately
this.gossip_timer = this.taskman.setTimer(GossipDelay, &this.gossipTask, Periodic.No);
this.gossip_timer.stop();
this.gossip_timer = this.taskman.createTimer(&this.gossipTask);
}

/// Shut down the gossiping timer
Expand Down

0 comments on commit 03f36b7

Please sign in to comment.