Skip to content

Commit ac42dc4

Browse files
authored
gh-157418: Correct the IocpProactor.recvfrom_into() parameter name (#157422)
1 parent 999855b commit ac42dc4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎Lib/asyncio/windows_events.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,11 @@ def recvfrom(self, conn, nbytes, flags=0):
515515
return self._register(ov, conn, partial(self._finish_recvfrom,
516516
empty_result=b''))
517517

518-
def recvfrom_into(self, conn, buf, flags=0):
518+
def recvfrom_into(self, conn, buf, nbytes=0):
519519
self._register_with_iocp(conn)
520520
ov = _overlapped.Overlapped(NULL)
521521
try:
522-
ov.WSARecvFromInto(conn.fileno(), buf, flags)
522+
ov.WSARecvFromInto(conn.fileno(), buf, nbytes)
523523
except BrokenPipeError:
524524
return self._result((0, None))
525525

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Correct the third parameter name of ``IocpProactor.recvfrom_into()`` from
2+
*flags* to *nbytes* to reflect that it specifies the number of bytes to
3+
receive.

0 commit comments

Comments
 (0)