public void reset() {
    synchronized (this) {
      try {
        if (connected || socket != null) {
          // Setting SO_LINGER to true and time to 0 to send TCP RST instead of TCP FIN
          socket.setSoLinger(true, 0);
          disconnect();
        }
      } catch (Exception e) {
        logger.error("Error while setting socket linger option {}", e);
      }
    }
  }
Sets socket options to close immediately
(subsequent Socket.close() will cause connection closure by sending TCP RST instead of FIN
ambry-network/src/main/java/com/github/ambry/network/BlockingChannel.java