Skip to content

Commit

Permalink
Merge pull request square#188 from square/jwilson/fix_razr_bug
Browse files Browse the repository at this point in the history
Don't explode if NetworkInterface.getByInetAddress does.
  • Loading branch information
swankjesse committed May 11, 2013
2 parents 8f586ba + d7e2438 commit fcbb0ab
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ private Java5(Method getMtu) {
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) {
Expand Down

0 comments on commit fcbb0ab

Please sign in to comment.