Skip to content

Commit

Permalink
if any exception on resolving hostname happens, InetAddress used as f…
Browse files Browse the repository at this point in the history
…allback
  • Loading branch information
fritzprix committed Jul 16, 2019
1 parent 76c84a7 commit 6645604
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 33 deletions.
96 changes: 64 additions & 32 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/main/java/com/doodream/robustdns/RobustDnsResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ public void handleException(Object o, Exception e) {
}));
return;
}
e.printStackTrace();
try {
emitter.onSuccess(InetAddress.getByName(name));
} catch (UnknownHostException ue) {
emitter.onError(ue);
}
}
});
}
Expand Down

0 comments on commit 6645604

Please sign in to comment.