Skip to content

Commit 23e74bf

Browse files
committed
Explicit creation of TimeSpan for compatibility with .NET Standard 2.0
1 parent cbd2f6a commit 23e74bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

StandardSocketsHttpHandler/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public HttpConnectionPoolManager(HttpConnectionSettings settings)
7575
{
7676
const int ScavengesPerIdle = 4;
7777
const int MinScavengeSeconds = 1;
78-
TimeSpan timerPeriod = settings._pooledConnectionIdleTimeout / ScavengesPerIdle;
78+
TimeSpan timerPeriod = new TimeSpan(settings._pooledConnectionIdleTimeout.Ticks / ScavengesPerIdle);
7979
_cleanPoolTimeout = timerPeriod.TotalSeconds >= MinScavengeSeconds ? timerPeriod : TimeSpan.FromSeconds(MinScavengeSeconds);
8080
}
8181

0 commit comments

Comments
 (0)