stopServerOnCancellation
fun ApplicationEngine.stopServerOnCancellation(application: Application, gracePeriodMillis: Long = 50, timeoutMillis: Long = 5000): CompletableJob
Stop server on job cancellation. The returned deferred need to be completed or cancelled.