Skip to content

Commit e64b117

Browse files
committed
SPY-193: Allow to override wakeupDelay
Motivation ---------- As part of SPY-172, a new wakeupDelay setting has been introduced, but as part of a mistake it has never been used to actually set the wakeup time, which is still hardcoded to 1000. Modifications ------------- This simple change modifies the code so it accepts the wakeupDelay setting, still having the default at 1000 but making it possible to override it through the system property. Result ------ The wakeupDelay can now be configured via a system property. Change-Id: If1273cb560d49ea2c9c42b7c7b70c84fd9aeebdc Reviewed-on: http://review.couchbase.org/75116 Tested-by: Michael Nitschinger <michael@nitschinger.at> Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
1 parent 2b6e3bb commit e64b117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/spy/memcached/MemcachedConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class MemcachedConnection extends SpyThread {
9393
private static final int EXCESSIVE_EMPTY = 0x1000000;
9494

9595
/**
96-
* The default wakeup delay if not overriden by a system property.
96+
* The default wakeup delay if not overridden by a system property.
9797
*/
9898
private static final int DEFAULT_WAKEUP_DELAY = 1000;
9999

@@ -409,7 +409,7 @@ public void handleIO() throws IOException {
409409
handleInputQueue();
410410
getLogger().debug("Done dealing with queue.");
411411

412-
long delay = 1000;
412+
long delay = wakeupDelay;
413413
if (!reconnectQueue.isEmpty()) {
414414
long now = System.currentTimeMillis();
415415
long then = reconnectQueue.firstKey();

0 commit comments

Comments
 (0)