On Mon, Apr 14, 2008 at 11:10:12AM -0700, Curt Hagenlocher wrote:
>               while True:
>                   left = size - buf_len
> !                 recv_size = max(self._rbufsize, left)
>                   data = self._sock.recv(recv_size)

What version is this patch against?  (The last 2.5 release, maybe?)
The max() in the above line should be min(), because you want to use
the *smaller* number of the buffer size and the # of remaining bytes
to read, not the *larger*.  This code is using min() in both 25-maint
and trunk.

--amk

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to