Skip to content

Remove the shutdown flag in the p2p #888

Open
@stanislav-tkach

Description

@stanislav-tkach

Currently the shutdown flag is needed because the p2p parts (tasks) are tightly coupled together and there is no easy way to organize a clear shutdown process. The tasks communicate using channels and when one of the tasks is shut down, it closes its end of a channel and that is considered an error by other tasks. The ChannelClosed error is used for that. When the shutdown flag is set such errors are basically ignored, otherwise an error is reported.

Ideally a graceful termination shouldn't require this flag and a shutdown order should be established. For example, backend can signal to the peer and the sync managers to shut down and wait for the corresponding tasks to be finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2pp2p related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions