On reconnection, select the correct db index

This commit is contained in:
Jonathan Leibiusky
2011-05-15 22:17:21 -03:00
parent 20ee796fa8
commit 607d31d96b
3 changed files with 19 additions and 1 deletions

View File

@@ -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();
}
}