File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
spring-web/src/main/java/org/springframework/http/client/reactive Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,25 @@ public void afterPropertiesSet() throws Exception {
143143 @ Override
144144 public void destroy () {
145145
146- Assert .notNull (this .connectionProvider , "No ConnectionProvider" );
147- this .connectionProvider .dispose ();
146+ try {
147+ ConnectionProvider provider = this .connectionProvider ;
148+ if (provider != null ) {
149+ provider .dispose ();
150+ }
151+ }
152+ catch (Throwable ex ) {
153+ // ignore
154+ }
148155
149- Assert .notNull (this .loopResources , "No LoopResources" );
150- this .loopResources .dispose ();
156+ try {
157+ LoopResources resources = this .loopResources ;
158+ if (resources != null ) {
159+ resources .dispose ();
160+ }
161+ }
162+ catch (Throwable ex ) {
163+ // ignore
164+ }
151165 }
152166
153167}
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ concurrency. In this mode global resources remain active until the process exits
9595If the server is timed with the process, there is typically no need for an explicit
9696shutdown. However if the server can start or stop in-process, e.g. Spring MVC
9797application deployed as a WAR, you can declare a Spring-managed bean of type
98- `ReactorResourceFactory` with `globaResources =true` (the default) to ensure the Reactor
98+ `ReactorResourceFactory` with `globalResources =true` (the default) to ensure the Reactor
9999Netty global resources are shut down when the Spring `ApplicationContext` is closed:
100100
101101[source,java,intent=0]
You can’t perform that action at this time.
0 commit comments