On reconnection, select the correct db index
This commit is contained in:
@@ -53,7 +53,11 @@ public class BinaryClient extends Connection {
|
||||
if (!isConnected()) {
|
||||
super.connect();
|
||||
if (password != null) {
|
||||
sendCommand(AUTH, password);
|
||||
auth(password);
|
||||
getStatusCodeReply();
|
||||
}
|
||||
if (db > 0) {
|
||||
select(Long.valueOf(db).intValue());
|
||||
getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ public class Connection {
|
||||
private int pipelinedCommands = 0;
|
||||
private int timeout = Protocol.DEFAULT_TIMEOUT;
|
||||
|
||||
public Socket getSocket() {
|
||||
return socket;
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user