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

Add timeout option #45

Closed
wants to merge 4 commits into from
Closed

Add timeout option #45

wants to merge 4 commits into from

Conversation

tomconnell-wf
Copy link
Member

Motivation

I hope to make the timeout on InfoReceiver handshake configurable. sockjs/sockjs-client#594

When that happens, the wrapper will need its api updated to actually pass in the timeout option to SockJS.

Changes

Add the timeout to the SockJsOptions

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Architecture member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@tomconnell-wf
Copy link
Member Author

This can't actually merge, since I manually made changes to sockjs.js, but the code changes are there because I needed to be able to test with https://github.com/Workiva/doc_plat_client/pull/30069

@aviary3-wk
Copy link

Security Insights

The items listed below may not capture all security relevant changes. Before providing a security review, be sure to review the entire PR for security impact.

(1) Security relevant changes were detected
  • Watched file lib/sockjs.js modified
  • Action Items

    • Obtain a security review; reviewer should pay special attention to insights listed above
    • Verify aviary.yaml coverage of security relevant code

    Questions or Comments? Reach out on Slack: #support-infosec.

    Comment on lines +559 to +560
    if (timeout === undefined) {
    timeout = InfoReceiver.timeout
    Copy link

    @patkujawa-wf patkujawa-wf Jul 8, 2022

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    If sockJS's internally calculated
    /// timeout is higher, that will be used instead.

    😕 if true, shouldn't this conditional be < ? But maybe also set a lower limit?

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Ah, it's min timeout!

    Copy link
    Member Author

    @tomconnell-wf tomconnell-wf Jul 8, 2022

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Oh, whoops, I must have had that slip through the cracks somewhere. I'll see what the sockjs maintainer says. (I don't know if they will want this or that)

    @patkujawa-wf
    Copy link

    Looks like dart format needed too

    Copy link
    Contributor

    @evanweible-wf evanweible-wf left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    LGTM pending that one question about the timeout and the upstream PR.

    @tomconnell-wf
    Copy link
    Member Author

    Couldn't get sockjs to look at my PR. sockjs/sockjs-client#594

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    None yet

    6 participants