Skip to content

Commit 5a0d51b

Browse files
[3.11] gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055) (GH-115723)
(cherry picked from commit e71468b) Co-authored-by: talcs <[email protected]>
1 parent b3384af commit 5a0d51b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/socket.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,9 @@ to sockets.
15061506

15071507
Receive data from the socket. The return value is a bytes object representing the
15081508
data received. The maximum amount of data to be received at once is specified
1509-
by *bufsize*. See the Unix manual page :manpage:`recv(2)` for the meaning of
1510-
the optional argument *flags*; it defaults to zero.
1509+
by *bufsize*. A returned empty bytes object indicates that the client has disconnected.
1510+
See the Unix manual page :manpage:`recv(2)` for the meaning of the optional argument
1511+
*flags*; it defaults to zero.
15111512

15121513
.. note::
15131514

0 commit comments

Comments
 (0)