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

Merge pull request #188 from square/jwilson/fix_razr_bug

Don't explode if NetworkInterface.getByInetAddress does.
This commit is contained in:
Jesse Wilson
2013-05-10 17:02:25 -07:00

View File

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