SEBSERV-374 fixed
This commit is contained in:
parent
4671e682a3
commit
574c397a54
1 changed files with 10 additions and 6 deletions
|
@ -225,8 +225,8 @@ public class FullPageMonitoringUpdate implements MonitoringFilter {
|
||||||
this.monitoringFullPageData = restCallBuilder
|
this.monitoringFullPageData = restCallBuilder
|
||||||
.call()
|
.call()
|
||||||
.get(error -> {
|
.get(error -> {
|
||||||
recoverFromDisposedRestTemplate(error);
|
|
||||||
this.pushContext.reportError(error);
|
this.pushContext.reportError(error);
|
||||||
|
recoverFromDisposedRestTemplate(error);
|
||||||
return this.monitoringFullPageData;
|
return this.monitoringFullPageData;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -307,11 +307,15 @@ public class FullPageMonitoringUpdate implements MonitoringFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void recoverFromDisposedRestTemplate(final Exception error) {
|
public void recoverFromDisposedRestTemplate(final Exception error) {
|
||||||
if (log.isDebugEnabled()) {
|
try {
|
||||||
log.debug("Try to recover from disposed OAuth2 rest template...");
|
if (log.isDebugEnabled()) {
|
||||||
}
|
log.debug("Try to recover from disposed OAuth2 rest template...");
|
||||||
if (error instanceof DisposedOAuth2RestTemplateException) {
|
}
|
||||||
this.pageService.getRestService().injectCurrentRestTemplate(this.restCallBuilder);
|
if (error instanceof DisposedOAuth2RestTemplateException) {
|
||||||
|
this.pageService.getRestService().injectCurrentRestTemplate(this.restCallBuilder);
|
||||||
|
}
|
||||||
|
} catch (final Exception e) {
|
||||||
|
log.error("Failed to recover from disposed rest template: ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue