diff options
author | Artur Signell <artur@vaadin.com> | 2015-08-06 11:13:21 +0300 |
---|---|---|
committer | patrik <patrik@vaadin.com> | 2015-08-12 16:12:28 +0300 |
commit | 2170d80b157933fb4fa36bf0cc66f3780efdf0f1 (patch) | |
tree | 5e85059f436aa5646d8a961749d4cde94f69b3fc /server | |
parent | ae98589bf87adf65af3f811f4bba3d8f31ccff18 (diff) | |
download | vaadin-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.java | 7 |
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 |