Commit 01982eb
Fix timestamp frequency mismatch in idle timeout calculation
Convert TimeSpan.Ticks to timestamp ticks using TimeProvider.TimestampFrequency.
TimeSpan.Ticks uses 100-nanosecond intervals (10,000,000 per second), but
TimeProvider.GetTimestamp() returns ticks based on TimeProvider.TimestampFrequency,
which varies by platform (e.g., ~1,000,000,000 on macOS, ~10,000,000 on Windows).
This was causing IdleTimeout to be incorrectly calculated, resulting in sessions
timing out much faster than configured on platforms with different frequencies.
Co-authored-by: eiriktsarpalis <[email protected]>1 parent ccfeaa4 commit 01982eb
File tree
1 file changed
+10
-1
lines changed- src/ModelContextProtocol.AspNetCore
1 file changed
+10
-1
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| |||
0 commit comments