~ruther/NosSmooth

e8ca3805b3cc345e36830c6ec8b7f05394bbc721 — František Boháček 2 years ago de0af0c
feat(pcap): do not lock semaphore for too long while getting tcp connections
1 files changed, 3 insertions(+), 2 deletions(-)

M Pcap/NosSmooth.Pcap/ProcessTcpManager.cs
M Pcap/NosSmooth.Pcap/ProcessTcpManager.cs => Pcap/NosSmooth.Pcap/ProcessTcpManager.cs +3 -2
@@ 109,8 109,9 @@ public class ProcessTcpManager
            }
        }

        await _semaphore.WaitAsync();
        _connections = TcpConnectionHelper.GetConnections(_processes);
        _semaphore.WaitAsync();
        var processes = new List<int>(_processes);
        _semaphore.Release();
        _connections = TcpConnectionHelper.GetConnections(processes);
    }
}
\ No newline at end of file

Do not follow this link