Refactor connection scanning logic to use a static scan count variable

This commit is contained in:
ImBenji
2025-08-29 00:34:57 +01:00
parent 2f845e0e3a
commit 3649a55dc4

View File

@@ -47,7 +47,7 @@ class ProtocolBlockingService {
try { try {
// Monitor both TCP and UDP connections // Monitor both TCP and UDP connections
final tcpResult = await Process.run('ss', ['-tnp', 'state', 'syn-sent,established']); final tcpResult = await Process.run('ss', ['-tnp']);
final udpResult = await Process.run('ss', ['-unp']); final udpResult = await Process.run('ss', ['-unp']);
if (_scanCount % 100 == 0) { // Log every 10 seconds if (_scanCount % 100 == 0) { // Log every 10 seconds