/** * Close the cnxn and remove it from the factory cnxns list. */ @Override public void close() { setStale(); if (!factory.removeCnxn(this)) { return; } if (zkServer != null) { zkServer.removeCnxn(this); } if (sk != null) { try { // need to cancel this selection key from the selector sk.cancel(); } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug("ignoring exception during selectionkey cancel", e); } } } closeSock(); }
@Override public void close() { factory.removeCnxn(this); if (zkServer != null) { zkServer.removeCnxn(this); } closeSock(); if (sk != null) { try { // need to cancel this selection key from the selector sk.cancel(); } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug("ignoring exception during selectionkey cancel", e); } } } }