code: public void abort() {
      this.explicitClosed = true;
  
      boolean lockStatus = false;
      if (lock != null) {
        lockStatus = lock.tryLock();
      }
      this.connected = false;
  
      abortActiveStream();
  
      if (!lockStatus) {
        //lock not available : query is running
        // force end by executing an KILL connection
        forceAbort();
        try {
          socket.setSoLinger(true, 0);
        } catch (IOException ioException) {
          //eat
        }
      } else {
        SendClosePacket.send(writer);
      }
  
      closeSocket(reader, writer, socket);
      cleanMemory();
      if (lockStatus) {
        lock.unlock();
      }
    }
docs: Force closes socket and stream readers/writers.