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

[Improvement] allow my_id to be not new-line terminated #14

Closed
kevinkk525 opened this issue Jan 3, 2019 · 1 comment
Closed

[Improvement] allow my_id to be not new-line terminated #14

kevinkk525 opened this issue Jan 3, 2019 · 1 comment

Comments

@kevinkk525
Copy link
Contributor

kevinkk525 commented Jan 3, 2019

By simply changing this line in the client.py constructor the library could support not new-line terminated ids:
self.my_id = my_id if my_id.endswith("\n") else my_id+"\n"

In my opinion this would improve compatibility as you typically don't have new-line terminated id strings if you use them in other parts of your application too.
If you happen to forget to the new-line termination, the whole library acts crazy, although it sometimes works as the next keepalive provides the new-line termination for the id.

@peterhinch
Copy link
Owner

Will do.

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

2 participants