IDEMPIERE-4154 ServerPush Adjustments. Fix logging error. commitResponse should be ok as long as resource is available.

This commit is contained in:
hengsin 2020-02-26 11:01:09 +08:00
parent 174ff192a4
commit ea1f86837d
2 changed files with 3 additions and 2 deletions

View File

@ -122,7 +122,7 @@ public class AtmosphereServerPush implements ServerPush {
private boolean commitResponse() throws IOException {
AtmosphereResource resource = this.resource.getAndSet(null);
if (resource != null && resource.isSuspended()) {
if (resource != null) {
resource.resume();
return true;
}

View File

@ -53,7 +53,8 @@ public class ZkAtmosphereHandler implements AtmosphereHandler {
if (session.getWebApp() instanceof WebAppCtrl) {
WebAppCtrl webAppCtrl = (WebAppCtrl) session.getWebApp();
Desktop desktop = webAppCtrl.getDesktopCache(session).getDesktopIfAny(dtid);
log.warn("Could not find desktop: " + dtid);
if (desktop == null)
log.warn("Could not find desktop: " + dtid);
return new Either<String, Desktop>("Could not find desktop", desktop);
}
return new Either<String, Desktop>("Webapp does not implement WebAppCtrl", null);