Selaa lähdekoodia

Guard against disconnect() being called twice (#15263)

Change-Id: I256529ebcf4a223faa6fd43c4090ba4544c2b040
tags/7.6.0.alpha4
Artur Signell 8 vuotta sitten
vanhempi
commit
e02262491c

+ 7
- 0
server/src/com/vaadin/server/communication/AtmospherePushConnection.java Näytä tiedosto

@@ -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

Loading…
Peruuta
Tallenna