src/main/java/org/robotframework/remoteserver/RemoteServer.java
public void stop(int timeoutMS) throws Exception {
        log.info("Robot Framework remote server stopping");
        if (timeoutMS > 0) {
            server.setGracefulShutdown(timeoutMS);
            Thread stopper = new Thread() {
                @Override
                public void run() {
                    try {
                        server.stop();
                    } catch (Throwable e) {
                        log.error(String.format("Failed to stop the server: %s", e.getMessage()), e);
                    }
                }
            };
            stopper.start();
        } else {
            server.stop();
        }
    }
public void stop(int timeoutMS) throws Exception {
        log.info("Robot Framework remote server stopping");
        if (timeoutMS > 0) {
            server.setGracefulShutdown(timeoutMS);
            Thread stopper = new Thread() {
                @Override
                public void run() {
                    try {
                        server.stop();
                    } catch (Throwable e) {
                        log.error(String.format("Failed to stop the server: %s", e.getMessage()), e);
                    }
                }
            };
            stopper.start();
        } else {
            server.stop();
        }
    }
public void stop ( int timeoutMS ) throws Exception { log . info ( "Robot Framework remote server stopping" ) ; if ( timeoutMS > 0 ) { server . setGracefulShutdown ( timeoutMS ) ; Thread stopper = new Thread ( ) { @ Override public void run ( ) { try { server . stop ( ) ; } catch ( Throwable e ) { log . error ( String . format ( "Failed to stop the server: %s" , e . getMessage ( ) ) , e ) ; } } } ; stopper . start ( ) ; } else { server . stop ( ) ; } }
A non-blocking method for stopping the remote server that allows requests
to complete within the given timeout before shutting down the server. New
connections will not be accepted after calling this.

@param timeoutMS
the milliseconds to wait for existing request to complete
before stopping the server
A non - blocking method for stopping the remote server that allows requests to complete within the given timeout before shutting down the server . New connections will not be accepted after calling this .