-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Up/Down Badge works when site is up - not when down #9844
Comments
OK, so it looks like if the website instantly responds with an invalid code (e.g: 500) or we get a connection error or whatever, we'll show the down image. If the upstream website fails in a way that just holds the connection open, we'll also just hang waiting. I think we need to add a timeout to https://github.com/badges/shields/blob/master/services/website/website.service.js (and update the docs). I'm inclined to make the timeout something like 3.5 seconds to try and keep the whole badge request/response inside the 4 second camo limit. |
@chris48s Thanks. I will try and setup a local instance and play around with it. Much appreciated. |
@chris48s Would you like me to take out this one? |
Yes - feel free. This should hopefully be a one line change 🤞 I just lost sight of it because someone else said they would submit the PR |
Sorry, I should have followed up but I assumed someone got to it before me as it stopped generating a an error. In the description I posted, the button after, But when I went back to check on it and take a shot at resolving the issue, it was no longer generating the error. |
When I took a look at the code ( But again, in any case server takes a significant amount of time responding, I could still implement some kind of a timeout for it. So, I leave the final decision to @chris48s. @chris48s, should I go on? |
I think it still makes sense to put a timeout on this 👍 |
After completing #9954, will go back to this. |
Are you experiencing an issue with...
shields.io
🐞 Description
Trying to use the website/up down badge. It works fine when the website is up:
But if the server is shutdown: after the timeout it does not show the website down image.
If I put in fake info - the down image does load correctly.
Any suggestions? Thanks. I did try and find a reeference somewhere to the issue, I am sure it is something rather simple - just cannot determien what it is.
🔗 Link to the badge
https://imagelessthought.github.io/mainroad/status/
This page has some that I threw on there for testing. It is the secnd one that shows the failure:
💡 Possible Solution
No response
The text was updated successfully, but these errors were encountered: