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

peers dissappear while still online #61

Open
caffeinum opened this issue Nov 2, 2018 · 0 comments
Open

peers dissappear while still online #61

caffeinum opened this issue Nov 2, 2018 · 0 comments

Comments

@caffeinum
Copy link

  • Version: commit: "", repo: 7, version: "0.32.3"
  • Platform: Chrome, Mac OS X Mojave (but bug happens on other platforms: Windows, Yandex Browser)
  • Subsystem: pubsub

Type: Bug

Severity: High

Description:

Sometimes, but very rarely, module loses connected peers and (presumably) calls them offline, while retaining connection for them (see screenshot).

The thing is our app highly relies on online/offline peer status, so we need to know for sure when peer went offline. To track that, we rely on pubsub's 'user offline' events.

Unfortunately, it seems sometimes message comes when user didn't really went offline. And then we can't know he is online, because pubsub does not send event when user's already online.

Steps to reproduce the error:

I can't reproduce it for now, but it happens once in a while.

Our code:
(https://github.com/swaponline/swap.core/blob/master/src/swap.room/SwapRoom.js#L80)

this.connection = ipfsRoom(...)

this.connection.on('peer joined', this._handleUserOnline)
this.connection.on('peer left', this._handleUserOffline)

Screenshots:

image

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

1 participant