Skip to content

Commit f2c370f

Browse files
daschlMichael Nitschinger
authored and
Michael Nitschinger
committed
SPY-162: Also respect nagle setting on reconnect.
Motivation ---------- If a server connection is reset (because it is lost or a reconnection is triggered), the nagle setting is not re-set properly. Modifications ------------- During the reconnect phase, properly re-set the nagle setting so it is respected on the new connection. Result ------ The custom nagle setting is respected and used even across new connections. Change-Id: Ic0b513b8538a39710aaf8fd0f0f699a5c561bc09 Reviewed-on: http://review.couchbase.org/35553 Tested-by: Michael Nitschinger <[email protected]> Reviewed-by: Matt Ingenthron <[email protected]>
1 parent 38954c1 commit f2c370f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ private void attemptReconnects() {
10781078

10791079
ch = SocketChannel.open();
10801080
ch.configureBlocking(false);
1081+
ch.socket().setTcpNoDelay(!connectionFactory.useNagleAlgorithm());
10811082
int ops = 0;
10821083
if (ch.connect(node.getSocketAddress())) {
10831084
connected(node);

0 commit comments

Comments
 (0)