Skip to content

Commit 121333d

Browse files
authored
Consider int zero to be an invalid value in property value
This matches the same behaviour for the TimeSpan property check
1 parent 0261c77 commit 121333d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Hangfire.PostgreSql/PostgreSqlStorageOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private static void ThrowIfValueIsNotPositive(TimeSpan value, string fieldName)
129129

130130
private static void ThrowIfValueIsNotPositive(int value, string fieldName)
131131
{
132-
if (value < 0)
132+
if (value <= 0)
133133
throw new ArgumentException($"The {fieldName} property value should be positive. Given: {value}.");
134134
}
135135
}

0 commit comments

Comments
 (0)