Fix memory leak in HubConnection (#20099)

This commit is contained in:
nymitr 2020-03-25 02:22:27 +03:00 committed by GitHub
parent 543e73b6b8
commit 196f4489e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -518,6 +518,11 @@ public class HubConnection {
connectionState = null;
}
if (pingTimer != null) {
pingTimer.cancel();
pingTimer = null;
}
logger.info("HubConnection stopped.");
hubConnectionState = HubConnectionState.DISCONNECTED;
handshakeResponseSubject.onComplete();