Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion js/net/src/announced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ export class Broadcast {
/** The broadcast path this handle watches. */
readonly path: Path.Valid;

/** The live broadcast, or `undefined` while it is offline. */
/**
* The live broadcast, or `undefined` while it is offline.
*
* Borrowed, not yours to close: this handle owns the consumer and swaps it when the path is
* republished. `active` keeps pointing at whatever you closed, so once you drop the last
* reference the shared broadcast is gone and reads fail until the next announcement replaces
* it. Take a {@link broadcast.Consumer.clone} for a lifetime of your own, or close this whole
* handle to release everything.
*/
readonly active: Getter<broadcast.Consumer | undefined>;

#active = new Signal<broadcast.Consumer | undefined>(undefined);
Expand Down
Loading