9e66708d87
Ownership is claimed with a Lua check-and-set keyed on the instance holding the websocket, routing prefers a live controller over a local copy, the session list deduplicates by owner, removal is ownership-checked, undelivered routed messages surface, single-session lookups stop scanning the keyspace and directory writes leave the request path bounded by a timeout.
26 lines
790 B
C#
26 lines
790 B
C#
using MediaBrowser.Model.Dto;
|
|
|
|
namespace MediaBrowser.Controller.Session;
|
|
|
|
/// <summary>
|
|
/// A session held by one instance, as the other instances see it.
|
|
/// </summary>
|
|
public sealed class SessionDirectoryEntry
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the identity of the instance holding the connection.
|
|
/// </summary>
|
|
public string OwnerPod { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the owner holds a live connection to the session. Only an
|
|
/// owner that does can be routed a remote-control message.
|
|
/// </summary>
|
|
public bool HoldsConnection { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the session as its owner last rendered it.
|
|
/// </summary>
|
|
public SessionInfoDto? Session { get; set; }
|
|
}
|