code: public void disconnect() {
          if (isConnected()) {
              try {
                  inputStream.close();
                  outputStream.close();
                  if (!socket.isClosed()) {
                      socket.close();
                  }
                  disconnectedTime = System.currentTimeMillis();
                  log.trace("[RedisConnectionSync] Disconnected {}", toString());
              } catch (IOException ex) {
                  throw new JedisConnectionException(ex);
              }
          }
      }
docs: Disconnect.