8000 gh-112020: socketserver: Add an example for keeping the connection open by talcs · Pull Request #112054 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112020: socketserver: Add an example for keeping the connection open #112054

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

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Doc/library/socketserver.rst
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
talcs and serhiy-storchaka authored Feb 20, 2024
commit 6828277c60d41b48bf110c1aa226f0262063b415
2 changes: 1 addition & 1 deletion Doc/library/socketserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ until the client hangs up::
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024)
# `socket.recv` indicates that the client has hung up by returning 0 bytes
if len(self.data) == 0:
if not self.data:
return
print("{} wrote:".format(self.client_address[0]))
print(self.data)
Expand Down
0