diff options
author | Artur Signell <artur@vaadin.com> | 2015-08-06 11:13:21 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-08-12 08:29:15 +0000 |
commit | e02262491c5d3d1b5c8c8e08a118af65e9b5f6ac (patch) | |
tree | cdabbb2a7dd6312873f400f108502a047be2cb26 | |
parent | 2b19ef308931a0f0d2d1a87b8ac11a38412eb0ef (diff) | |
download | vaadin-framework-e02262491c5d3d1b5c8c8e08a118af65e9b5f6ac.tar.gz vaadin-framework-e02262491c5d3d1b5c8c8e08a118af65e9b5f6ac.zip |
Guard against disconnect() being called twice (#15263)
Change-Id: I256529ebcf4a223faa6fd43c4090ba4544c2b040
-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 |