When two sessions join with same room and peer, cluster will have trouble in manage track sources:
Steps to Reproduce
Use SDK join 2 times with same token
Close 2 sessions
Server crash with exception:
thread '<unnamed>' panicked at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room/media_track/publisher.rs:107:48:
Should have track_source
stack backtrace:
0: rust_begin_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
1: core::panicking::panic_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
2: core::panicking::panic_display
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:263:5
3: core::option::expect_failed
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:1994:5
4: core::option::Option<T>::expect
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:895:21
5: media_server_core::cluster::room::media_track::publisher::RoomChannelPublisher<Endpoint>::on_track_unpublish
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room/media_track/publisher.rs:107:9
6: media_server_core::cluster::room::media_track::MediaTrack<Endpoint>::on_track_unpublish
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room/media_track.rs:80:9
7: media_server_core::cluster::room::ClusterRoom<Endpoint>::on_control_remote_track
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room.rs:212:17
8: media_server_core::cluster::room::ClusterRoom<Endpoint>::on_endpoint_control
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room.rs:181:68
9: <media_server_core::cluster::room::ClusterRoom<Endpoint> as sans_io_runtime::task::Task<media_server_core::cluster::room::Input<Endpoint>,media_server_core::cluster::room::Output<Endpoint>>>::on_event
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster/room.rs:73:51
10: sans_io_runtime::task::group::TaskGroup<In,Out,T,_>::on_event
at /Users/giangminh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sans-io-runtime-0.2.0/src/task/group.rs:75:13
11: media_server_core::cluster::MediaCluster<Endpoint>::on_endpoint_control
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_core/src/cluster.rs:142:13
12: media_server_runner::worker::MediaServerWorker<ES>::output_webrtc
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_runner/src/worker.rs:409:17
13: media_server_runner::worker::MediaServerWorker<ES>::pop_output
at /Users/giangminh/Workspace/8xff/dev/atm0s-media-server/packages/media_runner/src/worker.rs:330:37
14: <atm0s_media_server::server::media::runtime_worker::MediaRuntimeWorker<ES> as sans_io_runtime::worker::WorkerInner<media_server_runner::worker::Owner,atm0s_media_server::server::media::runtime_worker::ExtIn,atm0s_media_server::server::media::runtime_worker::ExtOut,atm0s_media_server::server::media::runtime_worker::Channel,atm0s_sdn_network::worker::SdnWorkerBusEvent<media_server_runner::worker::UserData,media_server_runner::worker::SC,media_server_runner::worker::SE,(),()>,atm0s_media_server::server::media::runtime_worker::ICfg<ES>,()>>::pop_output
at ./src/server/media/runtime_worker.rs:101:19
15: sans_io_runtime::worker::Worker<Owner,ExtIn,ExtOut,ChannelId,Event,Inner,ICfg,SCfg,B,_>::pop_inner
at /Users/giangminh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sans-io-runtime-0.2.0/src/worker.rs:284:31
16: sans_io_runtime::worker::Worker<Owner,ExtIn,ExtOut,ChannelId,Event,Inner,ICfg,SCfg,B,_>::process
at /Users/giangminh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sans-io-runtime-0.2.0/src/worker.rs:222:13
17: sans_io_runtime::controller::Controller<ExtIn,ExtOut,SCfg,ChannelId,Event,_>::add_worker::{{closure}}
at /Users/giangminh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sans-io-runtime-0.2.0/src/controller.rs:103:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Description
When two sessions join with same room and peer, cluster will have trouble in manage track sources:
Steps to Reproduce
Expected Behavior
Server don't crash
Actual Behavior
Server crash