src/main/java/org/java_websocket/server/WebSocketServer.java
private void doServerShutdown() {
		stopConnectionLostTimer();
		if( decoders != null ) {
			for( WebSocketWorker w : decoders ) {
				w.interrupt();
			}
		}
		if( selector != null ) {
			try {
				selector.close();
			} catch ( IOException e ) {
				log.error( "IOException during selector.close", e );
				onError( null, e );
			}
		}
		if( server != null ) {
			try {
				server.close();
			} catch ( IOException e ) {
				log.error( "IOException during server.close", e );
				onError( null, e );
			}
		}
	}
private void doServerShutdown() {
		stopConnectionLostTimer();
		if( decoders != null ) {
			for( WebSocketWorker w : decoders ) {
				w.interrupt();
			}
		}
		if( selector != null ) {
			try {
				selector.close();
			} catch ( IOException e ) {
				log.error( "IOException during selector.close", e );
				onError( null, e );
			}
		}
		if( server != null ) {
			try {
				server.close();
			} catch ( IOException e ) {
				log.error( "IOException during server.close", e );
				onError( null, e );
			}
		}
	}
private void doServerShutdown ( ) { stopConnectionLostTimer ( ) ; if ( decoders != null ) { for ( WebSocketWorker w : decoders ) { w . interrupt ( ) ; } } if ( selector != null ) { try { selector . close ( ) ; } catch ( IOException e ) { log . error ( "IOException during selector.close" , e ) ; onError ( null , e ) ; } } if ( server != null ) { try { server . close ( ) ; } catch ( IOException e ) { log . error ( "IOException during server.close" , e ) ; onError ( null , e ) ; } } }
Clean up everything after a shutdown
Clean up everything after a shutdown