Skip to content

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

@xPeyotii

Description

@xPeyotii

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));
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions