if (EXCEPTION_DEBUG) IOe.printStackTrace();
if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, IOe);
   public void disconnect()   {      synchronized (conn) {         synchronized (_reflock) {            if (0 == --_refcount) {               // Set all pending messages to have an error.               try {                  Error err = new Error(                        "org.freedesktop.DBus.Local" , "org.freedesktop.DBus.Local.Disconnected", 0, "s", new Object[] { "Disconnected" });                  synchronized (pendingCalls) {                     long[] set = pendingCalls.getKeys();                     for (long l: set) if (-1 != l) {                        MethodCall m = pendingCalls.remove(l);                        if (null != m)                           m.setReply(err);                     }                     pendingCalls = null;                   }                  synchronized (outgoing) {                     for (Message m: outgoing.getKeys())                        if (m instanceof MethodCall)                           ((MethodCall) m).setReply(err);                     outgoing = null;                  }                  synchronized (pendingErrors) {                     pendingErrors.add(err);                  }               } catch (DBusException DBe) {}               // run all pending tasks.               while (runnables.size() > 0)                  synchronized (runnables) {                     runnables.notifyAll();                  }               // stop the main thread               _run = false;               try {                  synchronized (thread) { thread.wait(); }               } catch (InterruptedException Ie) {}               // disconnect from the trasport layer               try {                  transport.disconnect();               } catch (IOException IOe) {                  if (EXCEPTION_DEBUG)                     IOe.printStackTrace();                           }               conn.remove(addr);               // stop all the workers               synchronized(workers) {                  for (_workerthread t: workers)                     t.halt();               }               // make sure none are blocking on the runnables queue still               synchronized (runnables) {                  runnables.notifyAll();               }            }         }      }   }