Skip to content

Commit

Permalink
Update publish side to send object statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
englishm committed Aug 9, 2024
1 parent 97bf70f commit eb9e06b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/contribute/broadcast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class Broadcast {
await subscriber.ack()

const stream = await subscriber.group({ group: 0 })
await stream.write({ object: 0, payload: bytes })
await stream.write({ object: 0, status: 0, payload: bytes })
await stream.close()
}

Expand All @@ -163,7 +163,7 @@ export class Broadcast {
const init = await track.init()

const stream = await subscriber.group({ group: 0 })
await stream.write({ object: 0, payload: init })
await stream.write({ object: 0, status: 0, payload: init })
await stream.close()
}

Expand Down Expand Up @@ -205,6 +205,7 @@ export class Broadcast {

await stream.write({
object,
status: 0,
payload: value,
})

Expand Down
1 change: 1 addition & 0 deletions lib/transport/publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export class SubscribeRecv {
group: props.group,
object: props.object,
priority: props.priority ?? 0,
status: 0,
})
}
}

0 comments on commit eb9e06b

Please sign in to comment.