From c1da2a4e73fc149b8ce0dbc46f9bc475381b94a2 Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Fri, 2 Dec 2022 10:25:43 +0100 Subject: [PATCH] Improve Netty code sample See gh-29622 --- framework-docs/src/docs/asciidoc/web/webflux.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework-docs/src/docs/asciidoc/web/webflux.adoc b/framework-docs/src/docs/asciidoc/web/webflux.adoc index ad24380f7b..d5e121d88e 100644 --- a/framework-docs/src/docs/asciidoc/web/webflux.adoc +++ b/framework-docs/src/docs/asciidoc/web/webflux.adoc @@ -387,7 +387,7 @@ The code snippets below show using the `HttpHandler` adapters with each server A ---- HttpHandler handler = ... ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); - HttpServer.create().host(host).port(port).handle(adapter).bind().block(); + HttpServer.create().host(host).port(port).handle(adapter).bindNow().onDispose().block(); ---- [source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"] .Kotlin