Skip to content

Commit

Permalink
draft05-interopsupport-with-moqrs-watchendpoint-bldfix (englishm#2)
Browse files Browse the repository at this point in the history
* draft05-interopsupport-with-moqrs-watchendpoint-bldfix

* draft05-interopsupport-with-moqrs-watchendpoint-bldfix2
  • Loading branch information
TilsonJoji authored Nov 5, 2024
1 parent 4671b9d commit cbc1224
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/transport/publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class Publisher {
this.#subscribe.set(msg.id, subscribe)
await this.#subscribeQueue.push(subscribe)

await this.#control.send({ kind: Control.Msg.SubscribeOk, id: msg.id, expires: 0n })
await this.#control.send({ kind: Control.Msg.SubscribeOk, id: msg.id, expires: 0n, group_order: msg.group_order })
}

recvUnsubscribe(_msg: Control.Unsubscribe) {
Expand Down Expand Up @@ -156,6 +156,8 @@ export class SubscribeRecv {
#objects: Objects
#id: bigint
#trackId: bigint
#subscriberPriority: number
groupOrder: Control.GroupOrder

readonly namespace: string
readonly track: string
Expand All @@ -170,6 +172,8 @@ export class SubscribeRecv {
this.#trackId = msg.trackId
this.namespace = msg.namespace
this.track = msg.name
this.#subscriberPriority = msg.subscriber_priority
this.groupOrder = msg.group_order
}

// Acknowledge the subscription as valid.
Expand All @@ -178,7 +182,7 @@ export class SubscribeRecv {
this.#state = "ack"

// Send the control message.
return this.#control.send({ kind: Control.Msg.SubscribeOk, id: this.#id, expires: 0n })
return this.#control.send({ kind: Control.Msg.SubscribeOk, id: this.#id, expires: 0n, group_order: this.groupOrder })
}

// Close the subscription with an error.
Expand Down

0 comments on commit cbc1224

Please sign in to comment.