Skip to content

Commit 11a9511

Browse files
committed
changed back minimal sync interval... it's a sync of list rather a sync of hub information. Can happen more often.
1 parent 4ae5f29 commit 11a9511

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/main/java/net/sharksystem/hub/BasicHubConnectionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public abstract class BasicHubConnectionManager implements HubConnectionManager
3636
* accurate. We can keep track of failed attempts. And we do.
3737
*/
3838
protected void syncLists() {
39-
// wait at least a second for a new sync
39+
// wait a few millis for a new sync
4040
long now = System.currentTimeMillis();
41-
if (now - this.lastSync <= MINIMAL_TIME_BEFORE_NEXT_HUB_SYNC_IN_MILLIS) return;
41+
if (now - this.lastSync <= 100L) return;
4242
this.lastSync = now;
4343

4444
// ask for current list from hub

src/main/java/net/sharksystem/hub/HubConnectionManager.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
* Interface for applications. It allows connection management with hubs.
1212
*/
1313
public interface HubConnectionManager extends NewHubConnectionListenerManagement {
14-
/**
15-
* The minimum time between two sync attempts between peer and hub.
16-
* Around a second sounds like a reasonable time.
17-
*/
18-
int MINIMAL_TIME_BEFORE_NEXT_HUB_SYNC_IN_MILLIS = 1000;
19-
2014
/**
2115
*
2216
* @return time when last sync with hubs happened. Is -1 if never synced

0 commit comments

Comments
 (0)