scriptsdk/CSharp-ScriptSDK-Legacy

Infinite loop in constructor

Closed this issue · 3 comments

while (!Win32.PeekMessage(out msg, 0, peekvalue, peekvalue, Win32.PM_REMOVE))
{
Thread.Sleep(10);
}

is it ok to have such thing in constructor Stealth()? Is there a way to get infinite sleep?

This is part of maxwells code, however as far i understand it waits for a packet reply from stealth client so if that not reply, api cant communicate anyways.

This is NOT an infinite loop. It's just waiting for a response from Stealth with a TCP port number. If we can not get an answer, we will not be able to work. Maybe we should add a timeout to this code

This is linked to your merge request @Maxwellwr
I close the issue for now.