Skip to content

Add callback for handling link errors in disconnected state#482

Merged
gemenerik merged 1 commit intomasterfrom
rik/link_error_callback
Oct 7, 2024
Merged

Add callback for handling link errors in disconnected state#482
gemenerik merged 1 commit intomasterfrom
rik/link_error_callback

Conversation

@gemenerik
Copy link
Member

Previously, there was no way to hook into link errors when the state was disconnected.

For example, when somehow unable to connect to a CF (let's say because it was turned off); on the initial connection attempt, a callback would be triggered for a failed connection, allowing scripts to handle the error. However, subsequent attempts did not trigger any callback, forcing autonomous scripts to blindly retry with a timeout. This commit introduces a disconnected_link_error callback, enabling scripts to respond to link errors more effectively and retry connections programmatically.

Previously, there was no way to hook into link errors when the state was disconnected. On the initial connection attempt, a callback would be triggered for a failed connection, allowing scripts to handle the error. However, subsequent attempts in the disconnected state did not trigger any callback, forcing autonomous scripts to blindly retry with a timeout. This commit introduces a `disconnected_link_error` callback, enabling scripts to respond to link errors more effectively and retry connections programmatically.
Copy link
Member

@tobbeanton tobbeanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a really good addition. It all looks good for me.

@gemenerik gemenerik merged commit aeb49b6 into master Oct 7, 2024
@gemenerik gemenerik deleted the rik/link_error_callback branch October 7, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants