- AAFLocator forceCastLoc = (AAFLocator) forceCastCon.hman().loc;
- maxRetries = forceCastLoc.maxIters();
+ if (forceCastCon.hman().loc instanceof SingleEndpointLocator) {
+ maxRetries = 1; // we cannot retry the single LGW gateway!
+ } else {
+ AAFLocator forceCastLoc = (AAFLocator) forceCastCon.hman().loc;
+ maxRetries = forceCastLoc.maxIters();
+ }