mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
New logic for delivering messages without a thread ID to a Chat object. This improves compatibility with clients that don't support thread ID. Also some misc formatting updates.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2779 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
afd7e6f2d6
commit
06b7a0eacc
6 changed files with 148 additions and 93 deletions
|
@ -76,10 +76,7 @@ public class PacketCollector {
|
|||
*/
|
||||
public void cancel() {
|
||||
// If the packet collector has already been cancelled, do nothing.
|
||||
if (cancelled) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (!cancelled) {
|
||||
cancelled = true;
|
||||
// Remove object from collectors list by setting the value in the
|
||||
// list at the correct index to null. The collector thread will
|
||||
|
@ -130,7 +127,9 @@ public class PacketCollector {
|
|||
try {
|
||||
wait();
|
||||
}
|
||||
catch (InterruptedException ie) { }
|
||||
catch (InterruptedException ie) {
|
||||
// Ignore.
|
||||
}
|
||||
}
|
||||
return (Packet)resultQueue.removeLast();
|
||||
}
|
||||
|
@ -149,7 +148,9 @@ public class PacketCollector {
|
|||
try {
|
||||
wait(timeout);
|
||||
}
|
||||
catch (InterruptedException ie) { }
|
||||
catch (InterruptedException ie) {
|
||||
// Ignore.
|
||||
}
|
||||
}
|
||||
// If still no result, return null.
|
||||
if (resultQueue.isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue