-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix(unchunker): initial allowed message size to env var #158
fix(unchunker): initial allowed message size to env var #158
Conversation
While I'm not against bumping that initial message size, I want to make sure it is actually needed (see my comment on the issue). Also can you reword your commit so it could trigger a new release/change log accordingly.
|
python/src/wslink/chunking.py
Outdated
@@ -87,7 +87,7 @@ class UnChunker: | |||
|
|||
def __init__(self): | |||
self.pending_messages = {} | |||
self.max_message_size = 512 | |||
self.max_message_size = 3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we replace that with the following instead? (also add import os
at the top)
def __init__(self):
self.pending_messages = {}
self.max_message_size = int(os.environ.get("WSLINK_AUTH_MSG_SIZE", 512))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way, for your usecase, you just need to set that ENV variable to your expected size.
Thanks for the change but since your commit message does not respect semantic release, I can not merge it. If I were to merge it as-is, no release will be created (and the point of your PR will be lost). |
I guess I'll squash your changes and rewrite your commit. (I always forgot that I can simply do it via github...) |
## [2.0.3](v2.0.2...v2.0.3) (2024-05-20) ### Bug Fixes * **unchunker:** initial allowed message size to env var ([#158](#158)) ([488d637](488d637))
🎉 This PR is included in version 2.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When sending a JWT token along with a message, this size ends up too small and results in a ValueError. This PR increases max_message_size to 3000 to accommodate.
fix #157