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:
parent
1b846cb76c
commit
aaffd71c69
1 changed files with 39 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue