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 {
143
143
@ Override
144
144
public void destroy () {
145
145
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
+ }
148
155
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
+ }
151
165
}
152
166
153
167
}
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
95
95
If the server is timed with the process, there is typically no need for an explicit
96
96
shutdown. However if the server can start or stop in-process, e.g. Spring MVC
97
97
application 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
99
99
Netty global resources are shut down when the Spring `ApplicationContext` is closed:
100
100
101
101
[source,java,intent=0]
You can’t perform that action at this time.
0 commit comments