Skip to content

Commit 235bc93

Browse files
authored
Added a log for when a PA fails starting on the first try. (#1184)
1 parent ecdea06 commit 235bc93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hivemq-edge/src/main/java/com/hivemq/protocols/ProtocolAdapterWrapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public ProtocolAdapterWrapper(
151151
.thenCompose(Function.identity())
152152
.handle((ignored, error) -> {
153153
if(error != null) {
154+
log.error("Error starting adapter", error);
154155
stopAfterFailedStart();
155156
protocolAdapterState.setRuntimeStatus(ProtocolAdapterState.RuntimeStatus.STOPPED);
156157
//we still return the initial error since that's the most significant information
@@ -182,6 +183,7 @@ public ProtocolAdapterWrapper(
182183
}
183184

184185
private void stopAfterFailedStart() {
186+
log.warn("Stopping adapter with id {} after a failed start", adapter.getId());
185187
final var stopInput = new ProtocolAdapterStopInputImpl();
186188
final var stopOutput = new ProtocolAdapterStopOutputImpl();
187189
stopPolling(protocolAdapterPollingService);

0 commit comments

Comments
 (0)