Skip to content

bug: endpoint does not clean up resources swiftly when dropped ungracefullyΒ #3867

@ramfox

Description

@ramfox
  • We want users to call endpoint::close before the endpoint is dropped. Calling close ensures that the endpoint is being a good/hygienic network citizen
  • However, when an endpoint IS dropped, there is no communication that this breach in protocol happened.
  • Furthermore, when it's dropped, it takes an unexpected amount of time to release its resources. (because quinn still monitors/babysits any open connections for PTO*3 amount of time before releases the connection resources.)
  • This causes confusion for the user/dev. There is no indication for the dev that the endpoint was dropped un-gracefully BUT ALSO there are still resources that are being held onto.
  • This can cause users issues when trying to recover. For example, the old endpoint may still attempt to connect to the relay using the given endpoint ID identity while the new endpoint tries to connect to it for the first time using that same endpoint ID, and they fight for contention until the old endpoint is finally cleaned up.

To fix both issues, we should:

  1. communicating to the user that they are handling the endpoint improperly and
  2. ensure that even when it handled improperly resources are released in an expected manner AKA we want to add the ability to drop everything in the endpoint on the floor when it is dropped un-gracefully.

Metadata

Metadata

Assignees

Labels

c-irohFunctionality of the core iroh crate.

Type

Projects

Status

πŸ— In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions