Skip to content

Commit

Permalink
Implement Closeable - fix #25
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille Le Clerc committed Jan 8, 2019
1 parent a5cc71e commit 0a72fb0
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ public void flush() {

@Override
public void close() throws SecurityException {
if (syslogMessageSender instanceof Closeable) {
try {
((Closeable) syslogMessageSender).close();
} catch (IOException e) {
e.printStackTrace();
}
try {
syslogMessageSender.close();
} catch (IOException e) {
e.printStackTrace();
}
}

Expand Down

0 comments on commit 0a72fb0

Please sign in to comment.