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

Check before sending /leave messages on socket disconnect #7

Closed DamonOehlman closed 10 years ago

DamonOehlman commented 10 years ago

It's possible for a peer to manually leave by calling signaller.leave() or manually by sending a /leave message. Thus the switchboard should check if a /leave has already been sent.

DamonOehlman commented 10 years ago

My revised opinion on this issue is that:

It shouldn't matter to a signaller on the client whether it receives duplicate /leave messages (the second is simply ignored). I don't think a switchboard component should have to be "smart" to determine which messages should be sent where, and it should just send messages as it's requested.