private void handleRemoteWorkerLost(final IStateQueue stateQueue){
  keepAliveTimer.cancel();
  if (cleanupGlobals.compareAndSet(true,false)) {
    tlcServer.removeTLCServerThread(this);
    if (stateQueue != null) {
      stateQueue.sEnqueue(states != null ? states : new TLCState[0]);
    }
    states=new TLCState[0];
    if (stateQueue != null) {
synchronized (stateQueue) {
        stateQueue.notifyAll();
      }
    }
    TLCGlobals.decNumWorkers();
  }
}

private void handleRemoteWorkerLost ( final IStateQueue stateQueue ) { keepAliveTimer . cancel ( ) ; if ( cleanupGlobals . compareAndSet ( true , false ) ) { tlcServer . removeTLCServerThread ( this ) ; if ( stateQueue != null ) { stateQueue . sEnqueue ( states != null ? states : new TLCState [ 0 ] ) ; } states = new TLCState [ 0 ] ; if ( stateQueue != null ) { synchronized ( stateQueue ) { stateQueue . notifyAll ( ) ; } } TLCGlobals . decNumWorkers ( ) ; } }
handles the case of a disconnected remote worker
