mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Small fixes.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1803 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
25628bd0e9
commit
f6b61b5715
1 changed files with 6 additions and 5 deletions
|
@ -64,7 +64,7 @@ import java.util.LinkedList;
|
|||
* use than a {@link PacketListener} when you need to wait for a specific
|
||||
* result.
|
||||
*
|
||||
* @see PacketReader#createPacketCollector(PacketFilter)
|
||||
* @see XMPPConnection#createPacketCollector(PacketFilter)
|
||||
* @author Matt Tucker
|
||||
*/
|
||||
public class PacketCollector {
|
||||
|
@ -85,7 +85,6 @@ public class PacketCollector {
|
|||
this.packetReader = packetReader;
|
||||
this.packetFilter = packetFilter;
|
||||
this.resultQueue = new LinkedList();
|
||||
|
||||
// Add the collector to the packet reader's list of active collector.
|
||||
synchronized (packetReader.collectors) {
|
||||
packetReader.collectors.add(this);
|
||||
|
@ -107,10 +106,12 @@ public class PacketCollector {
|
|||
// Remove object from collectors list by setting the value in the
|
||||
// list at the correct index to null. The collector thread will
|
||||
// automatically remove the actual list entry when it can.
|
||||
synchronized (packetReader.collectors) {
|
||||
int index = packetReader.collectors.indexOf(this);
|
||||
packetReader.collectors.set(index, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the packet filter associated with this packet collector. The packet
|
||||
|
|
Loading…
Reference in a new issue