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

离线功能异常 #6

Open
inwalking opened this issue Apr 25, 2017 · 3 comments
Open

离线功能异常 #6

inwalking opened this issue Apr 25, 2017 · 3 comments

Comments

@inwalking
Copy link

inwalking commented Apr 25, 2017

  • 版本2.5.2: 离线功能正常
  • 版本2.5.3: 断网后sync().ref("/.info/connected")能显示false,但网络恢复后无法自动重连数据库,sync().ref("/.info/connected")始终显示false,离线期间的本地数据库改动也无法同步云端数据库。
  • 版本2.5.5: 断网后sync().ref("/.info/connected")继续显示true,网络恢复后离线期间的本地数据库改动也无法同步云端数据库。

app.js

  onLaunch: function () {
    var config = {config}
    wilddog.initializeApp(config)
    this.ref = wilddog.sync().ref('todo')
    this.connectStatus = wilddog.sync().ref("/.info/connected");
  },

  addItem: function (text) {
    this.ref.push(text)
  },
  getConnectStatus: function () {
    let status = null
    this.connectStatus.once("value", function (snap) {
      status = snap.val()
    })
    return status
  },
@dongkai1993-zz
Copy link
Contributor

2.5.5存在重连失败的问题,近期将会修复。
2.5.3经测试,未发现问题,网络恢复后,/.info/connected 会在 websocket 建连成功后变为 true

@inwalking
Copy link
Author

2.5.3 虽然/.info/connected 会在 websocket 建连成功后变为true,但无法同步离线期间的本地数据操作

@inwalking
Copy link
Author

2.5.6 似乎并未修复改问题

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