summaryrefslogtreecommitdiff
path: root/src/android/net/dhcp/DhcpClient.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-04 03:56:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-04 03:56:02 +0000
commit43fc3e16d56830d7fb6e0dd70b888f7132e2c6e2 (patch)
treeb6c39937fe62343e0ee88c9a779d84825fd1add2 /src/android/net/dhcp/DhcpClient.java
parent80980838325ad4bf6bf59ce62ad2fe4af14fc9b1 (diff)
parent46028eec0b2d7f157fa555893355d5b8601ffc6b (diff)
Merge "Adjust the timeout parameters in DHCP client." into rvc-dev
Diffstat (limited to 'src/android/net/dhcp/DhcpClient.java')
-rw-r--r--src/android/net/dhcp/DhcpClient.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/android/net/dhcp/DhcpClient.java b/src/android/net/dhcp/DhcpClient.java
index 011cbaf..e19ac79 100644
--- a/src/android/net/dhcp/DhcpClient.java
+++ b/src/android/net/dhcp/DhcpClient.java
@@ -151,8 +151,8 @@ public class DhcpClient extends StateMachine {
// Timers and timeouts.
private static final int SECONDS = 1000;
- private static final int FIRST_TIMEOUT_MS = 2 * SECONDS;
- private static final int MAX_TIMEOUT_MS = 128 * SECONDS;
+ private static final int FIRST_TIMEOUT_MS = 1 * SECONDS;
+ private static final int MAX_TIMEOUT_MS = 512 * SECONDS;
private static final int IPMEMORYSTORE_TIMEOUT_MS = 1 * SECONDS;
// The waiting time to restart the DHCP configuration process after broadcasting a
@@ -200,8 +200,8 @@ public class DhcpClient extends StateMachine {
// This is not strictly needed, since the client is asynchronous and implements exponential
// backoff. It's maintained for backwards compatibility with the previous DHCP code, which was
- // a blocking operation with a 30-second timeout. We pick 36 seconds so we can send packets at
- // t=0, t=2, t=6, t=14, t=30, allowing for 10% jitter.
+ // a blocking operation with a 30-second timeout. We pick 18 seconds so we can send packets at
+ // t=0, t=1, t=3, t=7, t=16, allowing for 10% jitter.
private static final int DHCP_TIMEOUT_MS = 36 * SECONDS;
// DhcpClient uses IpClient's handler.