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

subscribe promise does not reject when the service is stopped #37

Open
iantocristian opened this issue Oct 8, 2024 · 0 comments
Open

Comments

@iantocristian
Copy link

iantocristian commented Oct 8, 2024

The service.stop implementation removes all the listeners from the connection here https://github.com/kibae/pg-logical-replication/blob/main/src/logical-replication-service.ts#L80 which prevents the subscribe query promise from completing (rejecting) when the service is stopped and underlying connection is closed.

We have a situation where we need to handle the hearbeat loss and resubscribe, but stop-ing the service fails to end the subscribe promise (one way or the other).

Is removing the connection listeners necessary?

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

No branches or pull requests

1 participant