Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Error: Not able to stop from state: stopping #2257

Closed
@lidel

Description

@lidel
  • Version: v0.36.4
  • Platform: JS
  • Subsystem: state machine

Type: Enhancement

Severity: Medium

Steps to reproduce the error:

calling .stop() on a node that is already stopping produces Error: Not able to stop from state: stopping

if (self.state.state() !== 'running') {
return callback(new Error('Not able to stop from state: ' + self.state.state()))

Proposed change

.stop() should be idempotent, all subsequent calls should detect stopping and return promise that resolves when stop event is emited by the very first .stop()

Y/n?

cc #1061, #890, ipfs/ipfs-companion#716

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions