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

[BUG] Reopen the connection causes duplication of messages #114

Open
cuonghuunguyen opened this issue Jun 12, 2020 · 0 comments
Open

[BUG] Reopen the connection causes duplication of messages #114

cuonghuunguyen opened this issue Jun 12, 2020 · 0 comments

Comments

@cuonghuunguyen
Copy link

Description

When the DDP connection to the BOT gets lost, the BOT will try to reopen the connection. When the connection is back, it will try to re-subscribe to the topics without unsubscribing the old ones. That can cause duplication of the message in the method bot.respondToMessages()

Step to reproduce

  • Run a bot which replies the incoming messages with respondToMessages() method
  • Disconnect the connection between the bot and the RocketChat server (turn off the server/turn off Nginx/etc)
  • Wait for the bot to start to reopen connection interval
  • Reconnect the connection between the bot and the RocketChat server

Expected behavior

Bot calls the callback in responseToMessages() once per message

Actual behavior

Bot calls the callback in responseToMessages() multiple times per message

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