public void shutdown ( ) { if ( ! isRunning ) return ; Executors . getInstance ( ) . execute ( new Runnable ( ) { @ Override public void run ( ) { if ( mHttpServer != null ) { mHttpServer . shutdown ( 3 , TimeUnit . MINUTES ) ; isRunning = false ; Executors . getInstance ( ) . post ( new Runnable ( ) { @ Override public void run ( ) { if ( mListener != null ) mListener . onStopped ( ) ; } } ) ; } } } ) ; }
Quit the server .