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

Is there a bug in this line of code? #718

Open
mty2015 opened this issue Dec 21, 2024 · 1 comment
Open

Is there a bug in this line of code? #718

mty2015 opened this issue Dec 21, 2024 · 1 comment

Comments

@mty2015
Copy link

mty2015 commented Dec 21, 2024

if len(fs.incoming)+len(msg) >= fs.incomingLength {

Is there something wrong with the code here? It should be changed to the following:

if fs.receivedLength+len(msg) >= fs.incomingLength 
@tulir
Copy link
Owner

tulir commented Dec 21, 2024

Looks like yes, that will break if a single frame is split over at least 3 websocket messages. Probably fairly rare in practice

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