Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue25471

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:socket.recv() blocks while it's gettimeout() returns 0.0
Type:Stage:resolved
Components:Versions:Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: animus, python-dev
Priority:normalKeywords:

Created on2015-10-24 23:03 byanimus, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
s1.pyanimus,2015-10-24 23:14
Messages (3)
msg253418 -(view)Author: Alexey Gorshkov (animus)Date: 2015-10-24 23:03
socket created with listening socket set to setblocking(False). gettimeout() of accept()-returned socket returns 0.0 , but recv() method blocks while client is connected and not sending any data. If client disconnects, socket returned by accept() starting return 0-length bytes string without blocking.glibc doc on recv():---If nonblocking mode is set for SOCKET, and no data are available to be read, 'recv' fails immediately rather than waiting.---testing server and client code attached.tested with Python 3.5.0 and Python 2.7.10
msg253419 -(view)Author: Alexey Gorshkov (animus)Date: 2015-10-24 23:10
telnet 127.0.0.1 9000 can be used as testing client
msg253420 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-10-25 03:07
New changeset10e044a734f3 by Benjamin Peterson in branch '3.4':accepted sockets shouldn't inherit the SOCK_NONBLOCK flag (closes#25471)https://hg.python.org/cpython/rev/10e044a734f3New changeset7577960ea17b by Benjamin Peterson in branch '3.5':merge 3.4 (#25471)https://hg.python.org/cpython/rev/7577960ea17bNew changeset347221cfa224 by Benjamin Peterson in branch 'default':merge 3.5 (#25471)https://hg.python.org/cpython/rev/347221cfa224
History
DateUserActionArgs
2022-04-11 14:58:23adminsetgithub: 69657
2015-10-25 03:07:43python-devsetstatus: open -> closed

nosy: +python-dev
messages: +msg253420

resolution: fixed
stage: resolved
2015-10-24 23:14:47animussetfiles: +s1.py
2015-10-24 23:14:30animussetfiles: -s1.py
2015-10-24 23:10:41animussetmessages: +msg253419
2015-10-24 23:03:29animuscreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp