Skip to content

retry host#77

Merged
xushiwei merged 5 commits intoqiniu:developfrom
lintianzhi:feature/retry_new_host
Jul 15, 2014
Merged

retry host#77
xushiwei merged 5 commits intoqiniu:developfrom
lintianzhi:feature/retry_new_host

Conversation

@lintianzhi
Copy link
Copy Markdown
Contributor

host的重试逻辑

Comment thread QiniuSDK/QiniuConfig.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 up.qiniu.com

Comment thread QiniuSDK/QiniuUtils.m
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是简单认为 code/100 == 5 && code != 579 就可以了?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里我还是列举出了不重试的情况。。考虑到比如连不上upload.qiniu.com,这样就收不到服务端的状态码

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

连不上当然是要重试的。我的意思不能重试的code应该是不可枚举的吧?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不重试:参数问题,我们的服务器问题,这些都可以根据code过滤掉;
但是重试的话,因为不清楚客户端和代理之间会发生什么事情(连不上,端口被拒绝,被reset掉等),以及代理服务器会发出什么样的错误,我觉得重试才是不可枚举的。

xushiwei added a commit that referenced this pull request Jul 15, 2014
@xushiwei xushiwei merged commit eb454cd into qiniu:develop Jul 15, 2014
@longbai longbai mentioned this pull request Jul 21, 2014
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

Successfully merging this pull request may close these issues.

2 participants