SMACK-463 Catch and log exceptions in packet listeners

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_2@13803 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Florian Schmaus 2013-11-05 19:55:16 +00:00 committed by flow
parent 49573866ab
commit 3ecb723a0d
1 changed files with 6 additions and 1 deletions

View File

@ -448,7 +448,12 @@ class PacketReader {
public void run() {
for (ListenerWrapper listenerWrapper : connection.recvListeners.values()) {
listenerWrapper.notifyListener(packet);
try {
listenerWrapper.notifyListener(packet);
} catch (Exception e) {
System.err.println("Exception in packet listener: " + e);
e.printStackTrace();
}
}
}
}