diff options
author | Artur Signell <artur@vaadin.com> | 2013-11-11 16:26:51 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-11-11 16:26:51 +0200 |
commit | dc5183c62552135a1f2aa5a94ef6796ffebfcf15 (patch) | |
tree | 96e87de11748d81b41dd09d9603bde377c641e01 /server | |
parent | 2f9bcc0c210dafecfdc2943b8603fa4f41a9f16f (diff) | |
parent | 13858578966dad8cf5a6f10448b42961817beafc (diff) | |
download | vaadin-framework-dc5183c62552135a1f2aa5a94ef6796ffebfcf15.tar.gz vaadin-framework-dc5183c62552135a1f2aa5a94ef6796ffebfcf15.zip |
Merge changes from origin/7.1
0d3c35b Forces redraw in IE 8 when table does post layout. (#12687)
533ddcd Fixed lost scrollLeft when row count changed in Table (#12652).
c351b64 Revert "Make Panel scroll the correct div (#12736)" Revert "Reverted change in how hack works (#12727, #12736)" Revert "Fixes the handling of the scroll position of a Window (#12736)" Revert "Recovering scroll position after regression problems. (#12727)" Revert "Ticket #12727 - Panels get unnecessary scroll bars in WebKit when content is 100% wide."
2e3e877 Fix scroll position handling in Window Webkit hack (#12736)
6b38173 Adds JBoss EAP 6 server to integration test suit (#12908)
e933562 Minimal fix for error handling with streaming (#12578)
1385857 Do not apply fix on mobile devices or devices without scrollbars (#12736)
Change-Id: I1e620342c936ea23eacd2082a0a92b15e453b924
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/communication/PushHandler.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java index b7cc628856..09428e47a9 100644 --- a/server/src/com/vaadin/server/communication/PushHandler.java +++ b/server/src/com/vaadin/server/communication/PushHandler.java @@ -264,11 +264,12 @@ public class PushHandler extends AtmosphereResourceEventListenerAdapter return; } + UI ui = null; session.lock(); try { VaadinSession.setCurrent(session); // Sets UI.currentInstance - final UI ui = service.findUI(vaadinRequest); + ui = service.findUI(vaadinRequest); if (ui == null) { sendNotificationAndDisconnect(resource, UidlRequestHandler.getUINotFoundErrorJSON(service, @@ -282,8 +283,19 @@ public class PushHandler extends AtmosphereResourceEventListenerAdapter SystemMessages msg = service.getSystemMessages( ServletPortletHelper.findLocale(null, null, vaadinRequest), vaadinRequest); + + AtmosphereResource errorResource = resource; + if (ui != null && ui.getPushConnection() != null) { + // We MUST use the opened push connection if there is one. + // Otherwise we will write the response to the wrong request + // when using streaming (the client -> server request + // instead of the opened push channel) + errorResource = ((AtmospherePushConnection) ui + .getPushConnection()).getResource(); + } + sendNotificationAndDisconnect( - resource, + errorResource, VaadinService.createCriticalNotificationJSON( msg.getInternalErrorCaption(), msg.getInternalErrorMessage(), null, |