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

RealtimeObject.open()出错时如何handle error? #75

Closed
cnjsstong opened this issue Apr 16, 2015 · 3 comments
Closed

RealtimeObject.open()出错时如何handle error? #75

cnjsstong opened this issue Apr 16, 2015 · 3 comments

Comments

@cnjsstong
Copy link

有时候会出现connection timeout的情况,好像目前没有一个on error的callback?

@wangxiao
Copy link
Contributor

open 还真是没对超时进行监控,但是失败会自动重连重试,后续考虑增加一个重试次数和超时的错误暴露。目前你可以手动在外层实现,或者直接 pull request 代码过来。

@wangxiao
Copy link
Contributor

目前可以在
rt.on('error', function() {});
里面捕获所有错误信息。

@wangxiao
Copy link
Contributor

目前还是推荐监听 reuse 事件,然后自行控制,可以觉得超时之后,自行 close(),然后再自行 open()

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

2 participants