Skip to content

On concurrent magnet URI request on server, they all fail #124

Description

@donkyfronky

As per title if there are two o more concurrent request the all fail with
Error: Cannot add duplicate torrent

a piece of stack is

node_modules/webtorrent/index.js:265 torrent._destroy(new Error(Cannot add duplicate torrent ${torrent.infoHash}))

This is actually expected, webtorrent raise an error, the other request after the first occur before webtorrent .remove occur. But if this is the case, serve could reply to the other requests (until webtorrent .removedoes not occur)
The server should handle the first and subsequent requests. I have a fix if you are interested :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions