This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Datagram Socket Timeouts
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: nnorwitz, tvrankar
Priority: normal Keywords:

Created on 2005-09-28 21:20 by tvrankar, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PythonUDPSocketBug.zip tvrankar, 2005-09-28 21:20 demo scripts (subject stuff happens in the client)
Messages (3)
msg26434 - (view) Author: Tom Vrankar (tvrankar) Date: 2005-09-28 21:20
Python 2.4.1, MS Windows 2000 with service packs

I'm trying to have a UDP client check for its server to
start by repeatedly throwing messages at where it's
expected to appear, and then checking for a response. I
set a timeout on the recvfrom, expecting to block for
the timeout and then proceeding to an exception
handler, looping so until data is returned. Instead,
the recvfrom throws an immediate exception "Connection
reset by peer", and I loop rapidly without the
load-softening effect of the timeout (in fact, it's the
same behavior as if I didn't set the timeout at all).
What UDP "connection" is it talking about?

Seems wrong, but is it the implementation or is it me?
If I start the server first, I get one "Invalid
argument" exception in the client. In both cases, once
the server is started, both processes are satisfied.

Thanks.

twv
msg26435 - (view) Author: Tom Vrankar (tvrankar) Date: 2005-09-29 17:15
Logged In: YES 
user_id=1353485

BTW: On Solaris 8 it works as expected, with a "timed out"
exception after the requested time out for each recvfrom
until the server appears. This may be a Windoze-specific
socket-ism.
msg26436 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-09-30 05:44
Logged In: YES 
user_id=33168

Dupe of 1308042
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42427
2005-09-28 21:20:25tvrankarcreate