[Patches] [ python-Patches-678257 ] fix for socket.sendall() with timeout

SourceForge.net noreply@sourceforge.net
Fri, 31 Jan 2003 10:21:39 -0800


Patches item #678257, was opened at 2003-01-31 12:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=678257&group_id=5470

Category: Modules
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Geoff Talvola (gtalvola)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for socket.sendall() with timeout

Initial Comment:
The way socket.sendall is coded now, if there's a
timeout set on the socket, and you're trying to send 2
bytes, and only one byte is able to be sent
immediately, you'll get one byte sent, then it'll loop
back around and an immediate error will occur without
waiting for the full timeout period.

Moving the internal_select() into the do-while loop
fixes the problem.  See the attached patch.

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-01-31 13:21

Message:
Logged In: YES 
user_id=6380

Thanks. Checked in as socketmodule.c rev 1.252.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=678257&group_id=5470