Skip to content

Commit

Permalink
add TODO regarding publishing any queued metrics once TNC connection …
Browse files Browse the repository at this point in the history
…closes
  • Loading branch information
rouyng committed Dec 28, 2023
1 parent 72595ea commit eecf11b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tncexporter/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ async def receive_packets(self):
except ConnectionResetError:
logging.error("Connection to TNC was reset")
self.client_socket.close()
# TODO: can we force any metrics in queue to be exported once the socket closes, so they don't wait
# in limbo until the sock_recv coroutine runs again?
# remake client socket
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self.kiss_mode:
Expand Down

0 comments on commit eecf11b

Please sign in to comment.