Closed NateKomodo closed 4 years ago
I have set this up like so:
async Task Read() { while (ws.IsConnected && !ct.IsCancellationRequested) { String msg = await ws.ReadStringAsync(ct).ConfigureAwait(false); } }
However, while this is running, CPU usage skyrockets to 100% and does not go back down until this code stops running. How can i resolve this?
Issue was elsewhere (There was an infinite while loop running while connected i had forgot to clean up)
I have set this up like so:
However, while this is running, CPU usage skyrockets to 100% and does not go back down until this code stops running. How can i resolve this?