Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReplicationConnection: allow callback to trigger disconnect #673

Merged
merged 2 commits into from
May 3, 2024

Conversation

DaemonSnake
Copy link
Contributor

Currently the only way to stop the replication connection workflow is to raise / exit from within a callback.
This allows callback to return {:disconnect, reason} and either stop cleanly (if auto_reconnect:false) or restart the replication connection (if set to true)

@josevalim
Copy link
Member

Looks great, can we have a simple test? One for auto_connect: false is enough. :)

@DaemonSnake
Copy link
Contributor Author

sure thing, will do ^^

@DaemonSnake
Copy link
Contributor Author

done

@josevalim josevalim merged commit ef6bd2f into elixir-ecto:master May 3, 2024
9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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