shalzuth/LostArkLogger

Rare crash when unchecking/checking winpcap

noita-player opened this issue · 0 comments

Switching between Machina and SharpPCAP calls .Stop() on Machina's TCPNetworkListener, below:

https://github.com/ravahn/machina/blob/master/Machina/TCPNetworkMonitor.cs#L107

Infrequently, the .wait(100) fails and they don't kill their task. Eventually, you get a crash when they attempt to call the OnDataReceived callback that is no longer there.

Maybe we can work around this without fixing Machina? Need to investigate calling .Stop(), replacing the OnDataReceived delegate, and only disposing it immediately before creating a new one.