mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Makes finalize more secure.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2345 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
d53f0e9492
commit
f7ccbe1421
1 changed files with 10 additions and 6 deletions
|
@ -2118,7 +2118,9 @@ public class MultiUserChat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void finalize() {
|
public void finalize() throws Throwable {
|
||||||
|
super.finalize();
|
||||||
|
try {
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
messageCollector.cancel();
|
messageCollector.cancel();
|
||||||
connection.removePacketListener(subjectListener);
|
connection.removePacketListener(subjectListener);
|
||||||
|
@ -2126,6 +2128,8 @@ public class MultiUserChat {
|
||||||
connection.removePacketListener(declinesListener);
|
connection.removePacketListener(declinesListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e) {}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An InvitationsMonitor monitors a given connection to detect room invitations. Every
|
* An InvitationsMonitor monitors a given connection to detect room invitations. Every
|
||||||
|
|
Loading…
Reference in a new issue