Fix default receive.timeout

This should be in milliseconds, not seconds. Set the default to be
2 minutes in milliseconds and update the documentation to reflect
that milliseconds are the default unit of time used here.

Change-Id: I50d74e91f4acec2b91daf59a16966cb89045d064
This commit is contained in:
Shawn O. Pearce
2012-03-12 15:52:11 -07:00
parent 1ae8c53498
commit 00dd12d6d1
2 changed files with 9 additions and 6 deletions

View File

@@ -73,8 +73,8 @@ public class AsyncReceiveCommits implements PreReceiveHook {
long getTimeoutMillis(@GerritServerConfig final Config cfg) {
return ConfigUtil.getTimeUnit(
cfg, "receive", null, "timeout",
TimeUnit.SECONDS.convert(2, TimeUnit.MINUTES),
TimeUnit.SECONDS);
TimeUnit.MINUTES.toMillis(2),
TimeUnit.MILLISECONDS);
}
}