|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -181,13 +181,13 @@ public class ReactorResourceFactory implements InitializingBean, DisposableBean |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void destroy() { |
|
|
|
public void destroy() { |
|
|
|
if (this.useGlobalResources) { |
|
|
|
if (this.useGlobalResources) { |
|
|
|
HttpResources.disposeLoopsAndConnections(); |
|
|
|
HttpResources.disposeLoopsAndConnectionsLater().block(); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
try { |
|
|
|
try { |
|
|
|
ConnectionProvider provider = this.connectionProvider; |
|
|
|
ConnectionProvider provider = this.connectionProvider; |
|
|
|
if (provider != null && this.manageConnectionProvider) { |
|
|
|
if (provider != null && this.manageConnectionProvider) { |
|
|
|
provider.dispose(); |
|
|
|
provider.disposeLater().block(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Throwable ex) { |
|
|
|
catch (Throwable ex) { |
|
|
|
@ -197,7 +197,7 @@ public class ReactorResourceFactory implements InitializingBean, DisposableBean |
|
|
|
try { |
|
|
|
try { |
|
|
|
LoopResources resources = this.loopResources; |
|
|
|
LoopResources resources = this.loopResources; |
|
|
|
if (resources != null && this.manageLoopResources) { |
|
|
|
if (resources != null && this.manageLoopResources) { |
|
|
|
resources.dispose(); |
|
|
|
resources.disposeLater().block(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Throwable ex) { |
|
|
|
catch (Throwable ex) { |
|
|
|
|