Fixing left behind streamer IDs when they're late to ID themselves.#432
Fixing left behind streamer IDs when they're late to ID themselves.#432mcottontensor merged 10 commits intoEpicGames:masterfrom mcottontensor:fix_late_streamer_id
Conversation
…e behind the legacy id
| // remove any existing streamer id | ||
| if (!!streamer.id) { | ||
| streamers.delete(streamer.id); | ||
| } |
There was a problem hiding this comment.
CC @Belchy06 any problems you forsee by doing this?
There was a problem hiding this comment.
Might just need to check if the reconnect flow still works.
I'd think that if a user connected when the streamer was assigned the legacy ID, it wouldn't be able to reconnect once the new streamer had ID'd itself.
There was a problem hiding this comment.
I've updated the behaviour by handling any previously subscribed players and sending them an event. The frontend now also will respond to the id change event by updating its subscribed streamer name.
There was a problem hiding this comment.
Changes look good.
One last thing, though. With the streamer id changed event, do you know if the dropdown in the settings panel updates as well?
There was a problem hiding this comment.
Hmm, looks like we'll need to add:
this.config.setOptionSettingValue(
OptionParameters.StreamerId,
newID
);to handleStreamerIDChangedMessage or bind to the new StreamerIDChangedMessageEvent where we set the option.
There was a problem hiding this comment.
Added this functionality. It wasn't that simple for various reasons but it now appears to update the settings dropdown properly.
…can keep track of its streamer (mostly for reconnecting).
|
|
||
| ### streamerIDChanged<a name="signalling-streameridchanged"></a> | ||
|
|
||
| > Message is used to communicate to [Player](#term-player)s that the [Streamer](#term-streamer) it is currently subscribed to is changing it's ID. This allows Players to keep track of it's currently subscribed Streamer and allow auto reconnects to the correct Streamer. This happens if a Streamer sends an [endpointID](#streamer-endpointid) message after it already has an ID assigned. (Can happen if it is late to respond to the [identify](#signalling-identify) message and is auto assigned a legacy ID.) |
There was a problem hiding this comment.
Just fixing a few it's => its
Message is used to communicate to Players that the Streamer it is currently subscribed to is changing its ID. This allows Players to keep track of its currently subscribed Streamer and allow auto reconnects to the correct Streamer. This happens if a Streamer sends an endpointID message after it already has an ID assigned. (Can happen if it is late to respond to the identify message and is auto assigned a legacy ID.)
Relevant components:
Problem statement:
If a streamer was slow to start up, it can be late to ID itself and the signalling server will assign it a legacy id. When the streamer finally replies it will get assigned a new ID but the old ID will be left behind leading to bad streamer lists with non existent streamer IDs.
Solution
When a streamer gets assigned an ID the server will check that any old ID is removed from the streamer list.
Documentation
Test Plan and Compatibility