public void stop(){
  clearCache();
  if (worker == null && conn == null) {
    return;
  }
  if (looper != null) {
    looper.quit();
  }
  if (worker != null) {
    worker.interrupt();
    try {
      worker.join();
    }
 catch (    InterruptedException e) {
      Log.i(TAG,"worker: join thread failed.");
      e.printStackTrace();
      worker.stop();
    }
    worker=null;
  }
  if (bos != null) {
    try {
      bos.close();
    }
 catch (    IOException e) {
      Log.i(TAG,"worker: close bos failed.");
      e.printStackTrace();
    }
    bos=null;
  }
  if (conn != null) {
    conn.disconnect();
    conn=null;
  }
  Log.i(TAG,String.format("worker: muxer closed, url=%s",url));
}

public void stop ( ) { clearCache ( ) ; if ( worker == null && conn == null ) { return ; } if ( looper != null ) { looper . quit ( ) ; } if ( worker != null ) { worker . interrupt ( ) ; try { worker . join ( ) ; } catch ( InterruptedException e ) { Log . i ( TAG , "worker: join thread failed." ) ; e . printStackTrace ( ) ; worker . stop ( ) ; } worker = null ; } if ( bos != null ) { try { bos . close ( ) ; } catch ( IOException e ) { Log . i ( TAG , "worker: close bos failed." ) ; e . printStackTrace ( ) ; } bos = null ; } if ( conn != null ) { conn . disconnect ( ) ; conn = null ; } Log . i ( TAG , String . format ( "worker: muxer closed, url=%s" , url ) ) ; }
stop the muxer , disconnect http connection from srs .
