In the ChromeSession class, after the socket has been opened once, m_openEvent stays set/true as it is never reset. This causes SendCommand to continue before the socket has fully opened thus resulting in the common "Command response not received" issue, socket exhaustion, and many other things not working as they should. Simply adding m_openEvent.Reset(); before m_sessionSocket.Open(); will fix this.
private async Task OpenSessionConnection(CancellationToken cancellationToken)
{
if (m_sessionSocket.State != WebSocketState.Open)
{
//m_openEvent.Reset(); needs to go here
m_sessionSocket.Open();
await Task.Run(() => m_openEvent.Wait(cancellationToken));
}
}