Skip to content

Get this error sometimes when a peer doesn't respond #355

@Gronis

Description

@Gronis

What version of this package are you using?
9.15.0
What operating system, Node.js, and npm version?
14.15.1
What happened?
The following exception is raised:

node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:380
        delete self.peers[offerId]
^
TypeError: Cannot convert undefined or null to object
    at Timeout._onTimeout (/Users/robin/git/webpeer/wps/build/webpack:/wps/node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:380:1)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)

It seams that self.peers is set to null.
After browsing the bittorrent-tracker code, I don't really understand why it is set to null though.
What did you expect to happen?
The peer is disconnected without exception.
Are you willing to submit a pull request to fix this bug?
Sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions