Merge branch 'master' of github.com:spring-projects/sts4
This commit is contained in:
@@ -19,6 +19,11 @@ import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
|
||||
import reactor.ipc.netty.channel.AbortedException;
|
||||
|
||||
/**
|
||||
* This is a stateful callable context that is "aware" of CF errors, and is not
|
||||
* suitable for reuse as it may cache errors
|
||||
*
|
||||
*/
|
||||
public class CFCallableContext {
|
||||
|
||||
private final CFParamsProviderMessages paramsProviderMessages;
|
||||
|
||||
@@ -75,8 +75,8 @@ public class CFTargetCache {
|
||||
if (target != null) {
|
||||
// If any CF errors occurred in the target, refresh once
|
||||
if (target.hasConnectionError()) {
|
||||
cache.refresh(key);
|
||||
target = cache.get(key);
|
||||
cache.refresh(key);
|
||||
target = cache.get(key);
|
||||
}
|
||||
targets.add(target);
|
||||
}
|
||||
@@ -87,6 +87,11 @@ public class CFTargetCache {
|
||||
}
|
||||
|
||||
protected CFTarget create(CFClientParams params) throws Exception {
|
||||
/*
|
||||
* Must pass a NEW callable context. Cannot be
|
||||
* the same as the target cache callable context, as
|
||||
* contexts may contain error state
|
||||
*/
|
||||
return new CFTarget(getTargetName(params), params, clientFactory.getClient(params, timeouts),
|
||||
new CFCallableContext(paramsProvider.getMessages()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user