Skip to content

Commit

Permalink
[#2267] Add missing disconnect handling
Browse files Browse the repository at this point in the history
Clear state of client factory when connection to service is lost.

Signed-off-by: Kai Hudalla <kai.hudalla@bosch.io>
  • Loading branch information
sophokles73 committed Nov 6, 2020
1 parent 4c7c5fb commit cff4556
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Expand Up @@ -94,6 +94,16 @@ private Future<org.eclipse.hono.client.CredentialsClient> getOrCreateCredentials
}));
}

/**
* {@inheritDoc}
*
* Clears the state of the client factory.
*/
@Override
protected void onDisconnect() {
clientFactory.clearState();
}

/**
* {@inheritDoc}
*/
Expand Down
Expand Up @@ -98,6 +98,16 @@ private void handleTenantTimeout(final Message<String> msg) {
}
}

/**
* {@inheritDoc}
*
* Clears the state of the client factory.
*/
@Override
protected void onDisconnect() {
clientFactory.clearState();
}

/**
* {@inheritDoc}
*/
Expand Down

0 comments on commit cff4556

Please sign in to comment.