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

Cancellation support. #137

Open
cheatfate opened this issue Apr 10, 2020 · 2 comments
Open

Cancellation support. #137

cheatfate opened this issue Apr 10, 2020 · 2 comments
Labels
discuss enhancement New feature or request v1 version 1 stable release
Milestone

Comments

@cheatfate
Copy link
Contributor

Currently nim-libp2p do not have cancellation support, and this can be one more source of leaks for applications which is going to use it.

All API calls which performs open(dial, connect)/read/write operations should handle cancellation and perform cleanup of allocated resources and/or reset stream operations.

Example of leak can be seen here:
https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/eth2_network.nim#L433-L442

Any other procedure which will going to use read/connect/dial with timeout should be able to cancel pending read/connect/dial operation.

@dryajov dryajov added discuss enhancement New feature or request labels Apr 14, 2020
@cheatfate
Copy link
Contributor Author

@dryajov sorry but its not an enhancement, its missing feature which leads to leaks.

@dryajov
Copy link
Contributor

dryajov commented Jan 26, 2021

This has been improved a lot but there are still a few flows that need revisiting, for example the upgrade flow is now extracted from the switch and we can test it separately.

@dryajov dryajov added this to the v1 milestone Jan 26, 2021
@dryajov dryajov added the v1 version 1 stable release label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss enhancement New feature or request v1 version 1 stable release
Projects
Status: backlog
Development

No branches or pull requests

2 participants