Skip to content

Commit 03ee796

Browse files
committed
bugfix: explicit null of socket when created
1 parent 0979add commit 03ee796

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/danga/MemCached/SockIOPool.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ protected SockIO createSocket( String host ) {
542542
catch ( Exception ex ) {
543543
log.error( "++++ failed to get SockIO obj for: " + host );
544544
log.error( ex.getMessage(), ex );
545+
socket = null;
545546
}
546547

547548
// if we failed to get socket, then mark
@@ -660,7 +661,7 @@ public SockIO getSock( String key, Integer hashCode ) {
660661

661662
// if we failed to get a socket from this server
662663
// then we try again by adding an incrementer to the
663-
// current hash and then rehashing
664+
// current key and then rehashing
664665
switch ( hashingAlg ) {
665666
case NATIVE_HASH:
666667
hv += ("" + tries + key).hashCode();

0 commit comments

Comments
 (0)