Skip to content

Commit

Permalink
dns: wait forever for msgs in queues, dont use a timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed Jan 27, 2025
1 parent 9ced304 commit 2f214c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/flowalerts/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,14 @@ def check_dns_without_connection_of_all_pending_flows(self):
flows in the pending_dns_without_conn queue before stopping slips,
doesnt matter if the 30 mins passed or not"""
while self.pending_dns_without_conn.qsize() > 0:
profileid, twid, pending_flow = self.pending_dns_without_conn.get(
timeout=4
)
profileid, twid, pending_flow = self.pending_dns_without_conn.get()
self.check_dns_without_connection(
profileid, twid, pending_flow, waited_for_the_conn=True
)

def get_dns_flow_from_queue(self):
"""Fetch and parse the DNS message from the dns_msgs queue."""
msg: str = self.dns_msgs.get(timeout=4)
msg: str = self.dns_msgs.get()
msg: dict = json.loads(msg["data"])
flow = self.classifier.convert_to_flow_obj(msg["flow"])
return flow
Expand Down

0 comments on commit 2f214c3

Please sign in to comment.