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

wstransport.nim: avoid re-raising 'TransportOsError' to avoid stopping switch.accept #929

Merged
merged 1 commit into from
Jul 7, 2023

Commits on Jul 6, 2023

  1. wstransport.nim: avoid re-raising 'TransportOsError' to avoid stoppin…

    …g `switch.accept`
    
    We found that a 'TransportOsError' can be raised by the next:
    
    https://github.com/status-im/nim-libp2p/blob/224f92e17251464984d6906316c54d2e1108ae43/libp2p/transports/wstransport.nim#L260
    
         let req = await finished
    
    That 'TransportOsError' exception was re-raised in `wstransport` and
    caught by the `switch.accept` proc, which made the main accept loop to
    end accepting new upcoming connections because 'TransportOsError' is
    'CatchableError'.
    
    https://github.com/status-im/nim-libp2p/blob/224f92e17251464984d6906316c54d2e1108ae43/libp2p/switch.nim#L277
    Ivansete-status committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    83b40d7 View commit details
    Browse the repository at this point in the history