Compare commits
2 Commits
a7602eed6e
...
04b1bcb0f9
Author | SHA1 | Date | |
---|---|---|---|
|
04b1bcb0f9 | ||
|
1243dec6b9 |
@ -7,7 +7,7 @@
|
|||||||
[Watch video (3:30mins)](https://www.sirlab.de/knowyt/know-your-teammates.mp4)
|
[Watch video (3:30mins)](https://www.sirlab.de/knowyt/know-your-teammates.mp4)
|
||||||
|
|
||||||
|
|
||||||
See Website https://www.sirlab.de/linux/games/knowyt/
|
See website https://www.sirlab.de/linux/games/knowyt/
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -81,17 +81,31 @@ export async function fetchUpdate(this: EngineContext) {
|
|||||||
const { status, statusText } = e.response
|
const { status, statusText } = e.response
|
||||||
if (status == 200) {
|
if (status == 200) {
|
||||||
delay = 1000
|
delay = 1000
|
||||||
} else {
|
} else if (status == 403) {
|
||||||
|
// credentials not valid any more
|
||||||
|
this.retry.value = -1
|
||||||
|
this.isActive = false
|
||||||
|
this.shouldStop = false
|
||||||
|
document.location.pathname = '/'
|
||||||
|
return
|
||||||
|
} else {
|
||||||
console.warn(`HTTP ${status} ${statusText}`)
|
console.warn(`HTTP ${status} ${statusText}`)
|
||||||
if (this.retry.value <= 15) {
|
if (this.retry.value > 30) {
|
||||||
delay = 1000
|
// after 90s give up
|
||||||
} else {
|
this.retry.value = -1
|
||||||
|
this.isActive = false
|
||||||
|
this.shouldStop = false
|
||||||
|
document.location.pathname = '/'
|
||||||
|
return
|
||||||
|
} else if (this.retry.value > 15) {
|
||||||
delay = 5000
|
delay = 5000
|
||||||
|
} else {
|
||||||
|
delay = 1000
|
||||||
}
|
}
|
||||||
this.version = -1
|
this.version = -1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// request aborted or other causes
|
// request aborted or other causes, stop fetching
|
||||||
console.warn(e.message)
|
console.warn(e.message)
|
||||||
|
|
||||||
this.retry.value = -1
|
this.retry.value = -1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user