Implemented MONITOR

This commit is contained in:
Jonathan Leibiusky
2010-08-08 13:48:04 -03:00
parent 0453ffcd1f
commit f0a426a7c7
5 changed files with 45 additions and 6 deletions

View File

@@ -68,12 +68,16 @@ public class Connection {
}
}
public void disconnect() throws IOException {
public void disconnect() {
if (connected) {
inputStream.close();
outputStream.close();
if (!socket.isClosed()) {
socket.close();
try {
inputStream.close();
outputStream.close();
if (!socket.isClosed()) {
socket.close();
}
} catch (IOException ex) {
throw new JedisException(ex);
}
connected = false;
}