提交 d4e3b0b8 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

increase reload timeout, and log total timeout for convenience

上级 d47c2fe6
......@@ -121,13 +121,15 @@ function fireRoomJoin(m) {
inviterContact = Contact.load(this.userId)
}
const max = 15
const backoff = 100
const max = 20
const backoff = 300
const timeout = max * (backoff * max) / 2
// 20 / 300 => 63,000
// max = (2*totalTime/backoff) ^ (1/2)
// timeout = 11,250 for {max: 15, backoff: 100}
yield retryPromise({ max: max, backoff: backoff }, attempt => {
log.silly('PuppetWebFirer', 'fireRoomJoin() retryPromise() attempt %d', attempt)
log.silly('PuppetWebFirer', 'fireRoomJoin() retryPromise() attempt %d with timeout %d', attempt, timeout)
return room.refresh()
.then(_ => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册