tyrus icon indicating copy to clipboard operation
tyrus copied to clipboard

RETRY_AFTER_SERVICE_UNAVAILABLE flag prevents onDisconnect from setting a delay

Open glassfishrobot opened this issue 10 years ago • 3 comments

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]

glassfishrobot avatar Aug 21 '15 15:08 glassfishrobot

  • Issue Imported From: https://github.com/tyrus-project/tyrus/issues/583
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @pavelbucek

glassfishrobot avatar Feb 10 '18 20:02 glassfishrobot

@glassfishrobot Commented Reported by enwiner

glassfishrobot avatar Aug 21 '15 15:08 glassfishrobot

@glassfishrobot Commented This issue was imported from java.net JIRA TYRUS-406

glassfishrobot avatar Apr 25 '17 03:04 glassfishrobot