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

Wrap problematic JSON.parse() in try catch #24

Merged
merged 2 commits into from Feb 23, 2019

Conversation

zetorian
Copy link
Contributor

This is not a great solution, but it is a functional one.
I have been using this personally for a couple of weeks now, no major issues, this will loose messages if they are sent faster than the synapse ratelimit, but I am not sure if that is due to this 'fix' or a limitation in the puppet bridge lacking retry logic.

The root cause of this issue seems to be an insuffecient check inside of hangups that sends two message's JSON at the same time, thereby causing a parse error. But if that simply fails, the messages still come through for whatever reason?

Anyway I do not have enough time to go through and fix this properly from the hangups side for a protocol Google will likely kill in the near future.

feedback welcome

fixes #22

@thomas-profitt
Copy link
Member

Thanks for your work on this. I'm more than happy to accept a hacky solution for a problem like this if it fixes a problem.

I'm going to go ahead and merge, and add a comment pointing here to describe the problem and solution.

@thomas-profitt thomas-profitt merged commit 2f8ea67 into matrix-hacks:master Feb 23, 2019
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.

crash with rapid message send / respond
2 participants