Fix session timeout due to timestamp frequency mismatch and activity tracking (#1106)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
This commit is contained in:
Copilot 2025-12-15 16:21:21 -05:00 • committed by GitHub
commit aaffd71c69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,6 +58,8 @@ internal sealed class StreamableHttpSession(
{
sessionManager.DecrementIdleSessionCount();
}
// Update LastActivityTicks when acquiring reference in Started state to prevent timeout during active usage
LastActivityTicks = sessionManager.TimeProvider.GetTimestamp();
break;
case SessionState.Disposed:
throw new ObjectDisposedException(nameof(StreamableHttpSession));