Skip to content

Commit

Permalink
Close after an RTE
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed Mar 31, 2024
1 parent 9264c21 commit ee47b04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/io/calimero/link/KNXNetworkLinkUsb.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void connectionStatus(final ConnectionStatus status) {

linkLayerMode();
}
catch (final KNXException e) {
catch (KNXException | RuntimeException e) {
notifier.quit();
conn.close();
throw e;
Expand All @@ -175,7 +175,7 @@ void connectionStatus(final ConnectionStatus status) {
}

@Override
public void addLinkListener(NetworkLinkListener l) {
public void addLinkListener(final NetworkLinkListener l) {
super.addLinkListener(l);
// make sure a new listener (which is probably the main link listener) gets an immediate notification
// if the usb knx connection is currently disrupted
Expand Down
2 changes: 1 addition & 1 deletion src/io/calimero/link/KNXNetworkMonitorUsb.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void connectionStatus(final ConnectionStatus status) {
// init offline variable to current knx connection status
conn.isKnxConnectionActive();
}
catch (final KNXException e) {
catch (KNXException | RuntimeException e) {
close();
throw e;
}
Expand Down

0 comments on commit ee47b04

Please sign in to comment.