if (!myWatched.isConnected()) {
if (myRunning && !myWatched.isConnected()) {
  protected void testConnection() throws IMConnectionException {    if (!myWatched.isConnected()) {      myWatched.connect();      myFailureCount = 0;    }    if (!myWatcher.isConnected()) {      myWatcher.connect();      myFailureCount = 0;    }    synchronized (myPingPongMessageLock) {      try {        //System.out.println("IMConnectionTester.testConnection: Sending PING to " + myWatched.getScreenName());        myWatcher.sendMessage(myWatched.getScreenName(), IMConnectionTester.PING_MESSAGE);        myPonged = false;        myPingPongMessageLock.wait(myTimeoutMillis);        if (!myPonged) {          //System.out.println("IMConnectionTester.testConnection: " + myWatcher.getScreenName() + " did not respond to PING");          myFailureCount++;          if (myFailureCount > 5) {            //System.out.println("IMConnectionTester.reconnect: Reconnecting " + myWatched.getScreenName());            myWatched.connect();            myFailureCount = 0;          }        }      }      catch (MessageException e) {        e.printStackTrace();      }      catch (InterruptedException e) {        // ignore      }      finally {        myPinged = false;        myPonged = false;      }    }  }