rtc-io / rtc-switchboard

Node server side in memory signaller for rtc.io components
http://www.rtc.io/modules.html
57 stars 36 forks source link

Remove Multiple Peers per Spark Logic #12

Closed DamonOehlman closed 10 years ago

DamonOehlman commented 10 years ago

The current announce handler attempts to handler a single primus spark being used by multiple signallers (see https://github.com/rtc-io/rtc-switchboard/blob/master/handlers/announce.js#L20). In retrospect I believe this behaviour is incorrect and unmanageable and should be reverted to only associate a single signaller per spark.

We should allow for spark reuse though, and ensure that an announce coming down the pipe with a different id to that which is associated with the spark is correctly handled (i.e previous signaller instance sends a leave message prior to the new signalling peers announce message being dispatched).