Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

js-ipfs has more connected peers than ipfs-pubsub-room #1691

Closed
caffeinum opened this issue Nov 2, 2018 · 2 comments
Closed

js-ipfs has more connected peers than ipfs-pubsub-room #1691

caffeinum opened this issue Nov 2, 2018 · 2 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:

Now, I am thinking the bug could be in https://github.com/ipfs-shipyard/ipfs-pubsub-room/ code, though I am not an expert, so I am filing it both ways.

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

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 'peer left' 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.

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

this.connection = ipfsRoom(...)

this.connection.on('peer joined', this._handleUserOnline) // here we gather data from him
this.connection.on('peer left', this._handleUserOffline) // here we remove his data

Screenshots:

image

@alanshaw
Copy link
Member

This sounds very much like an issue with pubsub room - it should be investegated there. If the cause is not found to be pubsub-room then please open another issue here with specifics about the issue with JS IPFS.

@caffeinum
Copy link
Author

OK, I'll put a link to that issue here for connection: issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants