summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lorenzo Colitti <lorenzo@google.com> 2015-03-31 07:04:42 +0900
committer Lorenzo Colitti <lorenzo@google.com> 2015-03-31 07:07:03 +0900
commitf5c17221d4ffc0d93063913aba37eaa1ee6f37a6 (patch)
treea7a4e41a3d4e0e191da9e3d5136aa30d3b8903c7
parentd91f19354d628e48577128f670afb0f5587e15e8 (diff)
Don't log errors if the receive thread is stopped.
Change-Id: I75ddc9b68f0a61a9a7a78026ed97a8a7c5109cc3
-rw-r--r--services/net/java/android/net/dhcp/DhcpClient.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/net/java/android/net/dhcp/DhcpClient.java b/services/net/java/android/net/dhcp/DhcpClient.java
index 57cc251649a3..e9203a491f3d 100644
--- a/services/net/java/android/net/dhcp/DhcpClient.java
+++ b/services/net/java/android/net/dhcp/DhcpClient.java
@@ -330,8 +330,10 @@ public class DhcpClient extends BaseDhcpStateMachine {
maybeLog("Received packet: " + packet);
sendMessage(CMD_RECEIVED_PACKET, packet);
}
- } catch(IOException|ErrnoException e) {
- Log.e(TAG, "Read error", e);
+ } catch (IOException|ErrnoException e) {
+ if (!stopped) {
+ Log.e(TAG, "Read error", e);
+ }
}
}
maybeLog("Stopping receive thread");