diff options
-rw-r--r-- | src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java index 1799dbf..1954f99 100644 --- a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java +++ b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java @@ -20,6 +20,7 @@ package net.java.sip.communicator.impl.packetlogging; import java.io.*; import java.util.*; +import com.google.common.collect.*; import net.java.sip.communicator.util.*; import org.jitsi.service.fileaccess.*; @@ -769,7 +770,7 @@ public class PacketLoggingServiceImpl /** * List of packets queued to be written in the file. */ - private final List<Packet> pktsToSave = new ArrayList<Packet>(); + private final Queue<Packet> pktsToSave = EvictingQueue.create(10); /** * Initializes a new <tt>SaverThread</tt>. @@ -805,7 +806,7 @@ public class PacketLoggingServiceImpl continue; } - pktToSave = pktsToSave.remove(0); + pktToSave = pktsToSave.poll(); } if(pktToSave != null) |