Skip to content

Commit

Permalink
fix jmdns oom error (#166)
Browse files Browse the repository at this point in the history
in case of closed jmdns,process call create function to get more _messageInputStream because of the old one exist

Signed-off-by: Zippo <zippozeng@qq.com>
  • Loading branch information
zippozeng authored and kaikreuzer committed Nov 1, 2018
1 parent 6e69389 commit fef7c8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/javax/jmdns/impl/DNSIncoming.java
Expand Up @@ -268,6 +268,12 @@ public DNSIncoming(DatagramPacket packet) throws IOException {
IOException ioe = new IOException("DNSIncoming corrupted message");
ioe.initCause(e);
throw ioe;
} finally {
try {
_messageInputStream.close();
} catch (Exception e) {
logger.warn("MessageInputStream close error");
}
}
}

Expand Down

0 comments on commit fef7c8d

Please sign in to comment.