Skip to content

Commit eba08a7

Browse files
committed
Merge branch '815-dispose-on-dispose' into 2.x
2 parents dcfb098 + 8ef727b commit eba08a7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ public void trust(String host, int port) {
141141
*/
142142
abstract Optional<Duration> getConnectTimeout();
143143

144+
@Value.Derived
145+
Optional<PoolResources> getConnectionPool() {
146+
return Optional.ofNullable(getConnectionPoolSize())
147+
.map(connectionPoolSize -> PoolResources.fixed("cloudfoundry-client", connectionPoolSize));
148+
}
149+
144150
/**
145151
* The {@code SO_KEEPALIVE} value
146152
*/
@@ -195,12 +201,8 @@ Optional<SslCertificateTruster> getSslCertificateTruster() {
195201
*/
196202
abstract Optional<Duration> getSslHandshakeTimeout();
197203

198-
private Optional<PoolResources> getConnectionPool() {
199-
return Optional.ofNullable(getConnectionPoolSize())
200-
.map(connectionPoolSize -> PoolResources.fixed("cloudfoundry-client", connectionPoolSize));
201-
}
202-
203-
private LoopResources getThreadPool() {
204+
@Value.Derived
205+
LoopResources getThreadPool() {
204206
return LoopResources.create("cloudfoundry-client", getThreadPoolSize(), true);
205207
}
206208

0 commit comments

Comments
 (0)