awaitRoom

abstract suspend fun awaitRoom(memberName: String? = null): ElectionOutcome

Await the session as a member: suspend until the elected host freezes the lobby, acknowledge it, and adopt the seam as us.tractat.kuilt.session.SessionRole.Joiner. (The host obtains its Room from start instead.)

Ends one of three ways — see ElectionOutcome. ElectionOutcome.Adopted is the session starting; ElectionOutcome.Torn is a mid-2PC collapse; ElectionOutcome.BecameHost means the hosting peer left and this peer is now the elected host, whose recovery is start on this same lobby. All three are terminal and reached within a bound: awaitRoom never suspends forever on a mid-2PC peer-set collapse.

It does suspend indefinitely while the lobby is simply empty or still weaving in — waiting for peers to show up is what a lobby is for, and is not a collapse. Cancel it to stop waiting.