Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Critical) SendCommand continuing before socket has opened, breaking all sorts of things. #7

Open
xWiinterphora opened this issue Jan 10, 2019 · 0 comments

Comments

@xWiinterphora
Copy link

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));
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant