update dlna play to device timeout

This commit is contained in:
Luke Pulverenti 2017-09-11 14:50:00 -04:00
parent 335ec27edc
commit 95084d6f7d
2 changed files with 2 additions and 18 deletions

View File

@ -113,7 +113,7 @@ namespace Emby.Dlna.PlayTo
private int GetInactiveTimerIntervalMs()
{
return Timeout.Infinite;
return 60000;
}
public void Start()

View File

@ -48,23 +48,7 @@ namespace Emby.Dlna.PlayTo
{
get
{
var lastDateKnownActivity = _creationTime > _device.DateLastActivity ? _creationTime : _device.DateLastActivity;
if (DateTime.UtcNow >= lastDateKnownActivity.AddSeconds(120))
{
try
{
// Session is inactive, mark it for Disposal and don't start the elapsed timer.
_sessionManager.ReportSessionEnded(_session.Id);
}
catch (Exception ex)
{
_logger.ErrorException("Error in ReportSessionEnded", ex);
}
return false;
}
return _device != null;
return !_disposed && _device != null;
}
}