eclipse-ee4j / eclipse-ee4j/tyrus

RETRY_AFTER_SERVICE_UNAVAILABLE flag prevents onDisconnect from setting a delay

Open
#583 3 comments 0 reactions 0 assignees View on GitHub
Component: client Priority: Minor Type: Bug
Dominant language
Java
Stars
128
Forks
49
PR merge metrics
No merged PRs in 30d

Description

If you set client.getProperties.put(ClientProperties.RETRY_AFTER_SERVICE_UNAVAILABLE, true) and also set up a ClientProperties.RECONNECT_HANDLER, you hit some strange behavior.

When the connection is closed, the code call the user's ReconnectHandler.onDisconnect() method. If that method returns true, it then calls ReconnectHandler.getDelay() to determine when to reconnect - but that method is overridden by the internal RetryAfterReconnectHandler.getDelay() method, so it will always return 0\. I don't see a way to set a user-defined delay for the onDisconnect handler.
#### Affected Versions
[1.11]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.