Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.
This repository was archived by the owner on May 24, 2022. It is now read-only.

isParityRunning takes 7 seconds to complete #27

@axelchalon

Description

@axelchalon

https://github.com/paritytech/js-libs/blob/master/packages/electron/src/runParity.ts

When we launch Fether, we check if Parity is running by calling isParityRunning, which tries to connect to various hosts. However, if the hosts are down (i.e. if Parity is not running), then the function takes a while to complete (delaying the launch of Parity by 7 seconds in my case) because each request hangs for quite a while

We could:

  • run the requests parallelly, or remove the hard-coded attempts to connect to http://127.0.0.1:8545 and http://127.0.0.1:8546
  • automatically time out if there was no succesful connexion after, say, 1s

The axios timeout setting does not seem to have an effect if the server cannot be reached

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions