File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
moqt-server/src/modules/message_handlers/control_message/handlers Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,19 @@ pub(crate) async fn subscribe_handler(
3939
4040 let downstream_subscribe_id = subscribe_message. subscribe_id ( ) ;
4141 let downstream_session_id = client. id ( ) ;
42- if !pubsub_relation_manager_repository
42+
43+ if pubsub_relation_manager_repository
4344 . is_downstream_subscribe_id_unique ( downstream_subscribe_id, downstream_session_id)
4445 . await ?
45- || !pubsub_relation_manager_repository
46- . is_downstream_subscribe_id_less_than_max (
47- downstream_subscribe_id,
48- downstream_session_id,
49- )
50- . await ?
5146 {
52- // TODO: return TerminationErrorCode
53- bail ! ( "TooManySubscribers" ) ;
47+ bail ! ( "DuplicateSubscribeID" ) ;
48+ }
49+
50+ if pubsub_relation_manager_repository
51+ . is_downstream_subscribe_id_less_than_max ( downstream_subscribe_id, downstream_session_id)
52+ . await ?
53+ {
54+ bail ! ( "SubscribeIDExceedsMaximum" ) ;
5455 }
5556
5657 let downstream_track_alias = subscribe_message. track_alias ( ) ;
You can’t perform that action at this time.
0 commit comments