1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-25 16:01:38 +03:00

Merge pull request #243 from kkocel/patch-1

Fixed Alcatel getByInetAddress bug.
This commit is contained in:
Jesse Wilson
2013-07-09 04:06:15 -07:00

View File

@@ -217,6 +217,9 @@ public class Platform {
return super.getMtu(socket); // There's no longer an interface with this local address.
}
return (Integer) getMtu.invoke(networkInterface);
} catch (NullPointerException e) {
// Certain Alcatel devices throw on getByInetAddress. Return default.
return super.getMtu(socket);
} catch (SocketException e) {
// Certain Motorola devices always throw on getByInetAddress. Return the default for those.
return super.getMtu(socket);