Skip to content

Commit

Permalink
Bugfix NPE in ClientAssociation#close()
Browse files Browse the repository at this point in the history
Added null check for reportListener
  • Loading branch information
SteffenBrauns authored May 22, 2023
1 parent f9f34cd commit 6d8859f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/main/java/com/beanit/iec61850bean/ClientAssociation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2110,15 +2110,17 @@ private void close(IOException e) {
closed = true;
acseAssociation.close();
lastIOException = e;
Thread t1 =
new Thread(
new Runnable() {
@Override
public void run() {
reportListener.associationClosed(lastIOException);
}
});
t1.start();
if (reportListener != null) {
Thread t1 =
new Thread(
new Runnable() {
@Override
public void run() {
reportListener.associationClosed(lastIOException);
}
});
t1.start();
}

MMSpdu mmsPdu = new MMSpdu();
mmsPdu.setConfirmedRequestPDU(new ConfirmedRequestPDU());
Expand Down

0 comments on commit 6d8859f

Please sign in to comment.