Skip to content

peers dissappear while still online #61

@caffeinum

Description

@caffeinum
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions