Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@almk-dev
Copy link
Contributor

@almk-dev almk-dev commented Jul 23, 2025

Description

Closes: #348

The WebSocket logic conditionally uses return, continue, and break as part of its control flow. However, the break statements inside the switch block is a no-op as it just exits the switch (which will happen anyways as it's the last statement in the case).

If the original intent is to exit the read loop and stop the socket flow entirely, we need a label for the outer loop and break that instead.


Author Checklist

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Reviewers Checklist

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

@almk-dev almk-dev changed the title add break label fix: add break label in ws loop to properly escape outer loop Jul 23, 2025
@almk-dev almk-dev marked this pull request as ready for review July 23, 2025 15:51
@almk-dev almk-dev requested review from a team as code owners July 23, 2025 15:51
@aljo242
Copy link
Contributor

aljo242 commented Jul 24, 2025

Is there a way to test this functionality?

@almk-dev
Copy link
Contributor Author

almk-dev commented Jul 24, 2025

@aljo242 We'd have to devise a test suite for the private methods. It might be more trouble than it's worth as this is just a fix meant to reflect the intent of the original logic and not a behavioral change.

@aljo242
Copy link
Contributor

aljo242 commented Jul 28, 2025

@aljo242 to review today

@aljo242 aljo242 self-assigned this Jul 28, 2025
@aljo242 aljo242 enabled auto-merge July 28, 2025 16:13
@aljo242 aljo242 added this pull request to the merge queue Jul 28, 2025
Merged via the queue into main with commit b826e3a Jul 28, 2025
16 checks passed
@aljo242 aljo242 deleted the fix-readloop-break branch July 28, 2025 16:24
zsystm pushed a commit to zsystm/evm that referenced this pull request Nov 2, 2025
Co-authored-by: Alex | Interchain Labs <[email protected]>
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

Successfully merging this pull request may close these issues.

Fix websocket read loop break logic

3 participants