Skip to content

Commit

Permalink
Merge pull request Jigsaw-Code#231 from Jigsaw-Code/bemasc-npe
Browse files Browse the repository at this point in the history
Catch NPE when the DOH client closed the socket
  • Loading branch information
Benjamin M. Schwartz authored Nov 12, 2019
2 parents a518b2c + f22579a commit 4b9eefa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ private boolean receive(DatagramPacket packet) {
} catch (IOException e) {
Log.i(LOG_TAG, "Read failed", e);
return false;
} catch (NullPointerException e) {
// Workaround for an Android platform bug. See https://github.com/Jigsaw-Code/Intra/issues/160
LogWrapper.logException(e);
return false;
}
}

Expand Down

0 comments on commit 4b9eefa

Please sign in to comment.