Исправлено сообщение о сохранении стримов по таймауту

This commit is contained in:
serega6531
2019-05-15 01:06:01 +03:00
parent add19bc27a
commit 19ceb97bcc
2 changed files with 16 additions and 5 deletions

View File

@@ -203,9 +203,16 @@ public class PcapWorker implements PacketListener {
if (stream.getProtocol() == protocol) {
final List<ru.serega6531.packmate.model.Packet> packets = entry.getValue();
if (System.currentTimeMillis() - packets.get(packets.size() - 1).getTimestamp() > timeoutMillis) {
if(streamService.saveNewStream(stream, packets)) {
streamsClosed++;
}
iterator.remove();
streamService.saveNewStream(stream, packets);
streamsClosed++;
if(protocol == Protocol.TCP) {
fins.remove(stream);
acks.remove(stream);
}
}
}
}