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

Connection gets stuck when rocketchat instance is down #163

Open
evakdev opened this issue Jun 17, 2023 · 0 comments
Open

Connection gets stuck when rocketchat instance is down #163

evakdev opened this issue Jun 17, 2023 · 0 comments

Comments

@evakdev
Copy link

evakdev commented Jun 17, 2023

I've set a bot to listen to messages of a rocketchat instance:

const { driver } = RocketChat
await driver.connect({
        host: url.hostname,
        useSsl: url.protocol === "https:"
    })
await driver.login({ username: url.username, password: url.password })
await driver.joinRooms(state.rocketchatRooms)
await driver.subscribeToMessages()

However, if for any reason the connection to the rocketchat instance is closed (e.g. if it is down), then my bot will get stuck. it will not restart the connection nor will it stop working. I have to manually restart it to fix the issue.

I believe this could be handled inside the sdk. Is there such an implementation? If not, what would be the best way to handle this issue? For example, how could I make it so that it restarts the connection when it is closed?

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