public static void hangIfStopped(){
  if (que.get() == null)   try {
    Thread.sleep(300000);
  }
 catch (  InterruptedException ignored) {
  }
}

public static void hangIfStopped ( ) { if ( que . get ( ) == null ) try { Thread . sleep ( 300000 ) ; } catch ( InterruptedException ignored ) { } }
hangs for 5 minutes if stopped .
