summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-08-06 11:13:21 +0300
committerpatrik <patrik@vaadin.com>2015-08-12 16:12:28 +0300
commit2170d80b157933fb4fa36bf0cc66f3780efdf0f1 (patch)
tree5e85059f436aa5646d8a961749d4cde94f69b3fc /server
parentae98589bf87adf65af3f811f4bba3d8f31ccff18 (diff)
downloadvaadin-framework-2170d80b157933fb4fa36bf0cc66f3780efdf0f1.tar.gz
vaadin-framework-2170d80b157933fb4fa36bf0cc66f3780efdf0f1.zip
Guard against disconnect() being called twice (#15263)
Change-Id: I9fa8b5659b4079684f3348c18a6e246914ee8447
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/AtmospherePushConnection.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java
index 357278f411..a45d9aa059 100644
--- a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java
+++ b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java
@@ -274,6 +274,13 @@ public class AtmospherePushConnection implements PushConnection {
public void disconnect() {
assert isConnected();
+ if (resource == null) {
+ // Already disconnected. Should not happen but if it does, we don't
+ // want to cause NPEs
+ getLogger()
+ .fine("AtmospherePushConnection.disconnect() called twice, this should not happen");
+ return;
+ }
if (resource.isResumed()) {
// This can happen for long polling because of
// http://dev.vaadin.com/ticket/16919