Skip to content

fix command just recv 8K#717

Closed
yyfyfyang wants to merge 1 commit intopython-zk:masterfrom
yyfyfyang:master
Closed

fix command just recv 8K#717
yyfyfyang wants to merge 1 commit intopython-zk:masterfrom
yyfyfyang:master

Conversation

@yyfyfyang
Copy link

Fixes #

Why is this needed?

sock.recv(8192)
recv byte 8K, Can not be modified,there will be data loss

@jeffwidman
Copy link
Member

Hmm, the description of the problem makes sense, I haven't dug into lower level networking code in a while, so not sure if this is the best way to solve or if this should be fixed through an OS-level config, or if 8k is python's default regardless of the OS setting...

Regardless, now that #716 landed, can you rebase this to see what CI thinks?

result = b""
temp = sock.recv(8192)
while temp:
result += temp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code loops forever as you never update temp in the loop

@yyfyfyang yyfyfyang closed this by deleting the head repository Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants