diff options
-rw-r--r-- | server/src/com/vaadin/server/communication/AtmospherePushConnection.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/server/communication/PushHandler.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java index 8b146e3d50..0bd3dc5a14 100644 --- a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java +++ b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java @@ -37,7 +37,7 @@ public class AtmospherePushConnection implements Serializable, PushConnection { private UI ui; private boolean pending = true; - private AtmosphereResource resource; + private transient AtmosphereResource resource; public AtmospherePushConnection(UI ui) { this.ui = ui; diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java index 146671e3a6..b2994d547f 100644 --- a/server/src/com/vaadin/server/communication/PushHandler.java +++ b/server/src/com/vaadin/server/communication/PushHandler.java @@ -109,6 +109,12 @@ public class PushHandler implements AtmosphereHandler { connection.connect(resource); } else if (req.getMethod().equalsIgnoreCase("POST")) { + assert connection.isConnected() : "Got push from the client " + + "even though the connection does not seem to be " + + "open. This might happen if a HttpSession is " + + "serialized and deserialized while the push " + + "connection is kept open."; + /* * We received a UIDL request through Atmosphere. If the push * channel is bidirectional (websockets), the request was sent |