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

Ping-Service should use a timeout #804

Open
0x483d opened this issue Sep 1, 2024 · 0 comments
Open

Ping-Service should use a timeout #804

0x483d opened this issue Sep 1, 2024 · 0 comments

Comments

@0x483d
Copy link

0x483d commented Sep 1, 2024

By default, the Ping-Service uses fetch to get the status of the target web application

      this.fetch("/", { method, cache: "no-cache" }, false)
        .then(() => {
          this.status = "online";
        })
        .catch(() => {
          this.status = "offline";
        });

If a web application is offline, and there is no response, fetch waits a few seconds until it times out.
Until there was no timeout, the web application will not be marked as offline.

Is it possible to add a "timeout" option (in addition to the already existing method option) to set the timeout to a given value.
By setting it for example to 500ms, the web application would be marked as "offline" much faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant