Destroy connectivity checker when client is destroyed.

This commit is contained in:
akwizgran
2022-07-19 12:42:25 +01:00
parent 6b6880c1ff
commit 46bb2b8ec2
4 changed files with 32 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ class ContactMailboxClient implements MailboxClient {
}
if (uploadWorker != null) uploadWorker.destroy();
if (downloadWorker != null) downloadWorker.destroy();
// The connectivity checker belongs to the client, so it should be
// destroyed. The Tor reachability monitor is shared between clients,
// so it should not be destroyed
connectivityChecker.destroy();
}
@Override

View File

@@ -86,6 +86,10 @@ class OwnMailboxClient implements MailboxClient {
for (MailboxWorker worker : uploadWorkers) worker.destroy();
if (downloadWorker != null) downloadWorker.destroy();
contactListWorker.destroy();
// The connectivity checker belongs to the client, so it should be
// destroyed. The Tor reachability monitor is shared between clients,
// so it should not be destroyed
connectivityChecker.destroy();
}
@Override