pendingUnlock =false;
   public final boolean disconnect() {      if (me != null && me.isAlive()) {         me.interrupt();         keepTrucking = false;         pthread.interrupt();      }      screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,"X - Disconnected");      screen52.setKeyboardLocked(false);      try {         if (bin != null)            bin.close();         if (bout != null)            bout.close();         if (sock != null) {            System.out.println("Closing socket");            sock.close();         }         connected = false;         controller.fireSessionChanged(TN5250jConstants.STATE_DISCONNECTED);      }      catch(Exception exception) {         System.out.println(exception.getMessage());         connected = false;         devSeq = -1;         return false;      }      devSeq = -1;      return true;   }