Skip to content

trickle = true causes issues when multiple signals are received #1

@hharnisc

Description

@hharnisc

The trickle setting to true enables trickle ICE which can send multiple signal events if your local network is configured in a certain way (say your socket.io-p2p server is being served from local host for instance).

When multiple signal events are received an incomplete offer is sent (offer.sdp), because only the first offer is accepted.

https://github.com/socketio/socket.io-p2p/blob/master/index.js#L74

And this causes P2P connections to fail because they don't know how to contact the peer.

The trickle setting is set in 2 places

https://github.com/socketio/socket.io-p2p/blob/master/index.js#L55
https://github.com/socketio/socket.io-p2p/blob/master/index.js#L83

Setting these to false fixed the issue for me. Happy to submit a PR for this if you like, it's only a couple lines of code.

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