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

Multiple websocket connections inside same instance #180

Closed
logscl opened this issue Jun 3, 2017 · 4 comments
Closed

Multiple websocket connections inside same instance #180

logscl opened this issue Jun 3, 2017 · 4 comments

Comments

@logscl
Copy link
Contributor

logscl commented Jun 3, 2017

Hello,

Today I saw something strange: my bot (using the 1.0.0 version of the api) received multiple times the same message.

I'm not really sure, but I tracked down the issue to this event sent on the websocket: https://api.slack.com/events/reconnect_url.

As stated in the documentation, it is an experimental event. It was added in the last version of the api, here: 13e7eee#diff-79822ecabbc36be14bb59e1555051aeeR875

I Think that this event should be ignored right now, or at least check the current state of the session and close it before opening a new one.

I can provide logging if it helps track down the issue.

Thanks.

@bcorne
Copy link
Contributor

bcorne commented Jun 8, 2017

Hi,

I need to check but the URL should be used only on reconnection. Some logs would be helpful indeed.

Best regards,

Benoit

@logscl
Copy link
Contributor Author

logscl commented Jun 8, 2017

Hi,

I checked again my logs and I was a little quick on my first thought :).

However, I think I found the guilty part (and I was able to reproduce the issue).

Here: 13e7eee#diff-79822ecabbc36be14bb59e1555051aeeR321, when an exception is raised (for instance when a message cannot be parsed), the socked is nullified and not closed properly.

That problem should be quick to reproduce: On a channel where a bot is present, upload a file and then add comments to it. The bot will not be able to parse the message. You will also notice that the ping continues it's incrementation instead of going to 0 again.

Could it be the issue there ?

Thanks.

Regards,

Logan

@crummy
Copy link

crummy commented Oct 17, 2017

I've reproduced this behaviour with the steps you describe, logscl.

@bcorne
Copy link
Contributor

bcorne commented Oct 20, 2017

solved in master branch with commit f5c87b2

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

3 participants