[Spread-users] Is there a limit on total traffic sent by Spread?
Guido van Rossum
guido at python.org
Sun Jan 20 13:12:57 EST 2002
> The Sess_read() method in session.c is registered to be called by the
> event system upon activity on a file descriptor. The event system is
> using select to determine whether there is at least 1 byte available to
> be read or that an error has occurred. Since the socket is non-blocking
> and it is in a select() call, it should never return EWOULDBLOCK.
That would be true if there were a single recv() call in Sess_read().
But there are two calls to recv() in that function, and the second one
is in a loop that isn't satisfied until all expected bytes are read.
All this while the socket is in non-blocking mode.
> The only that thing I noticed that looked strange was that the ioctl()
> call is not ifdef'd for ARCH_PC_WIN95 since I believe the windows
> version is called ioctlsocket() and the ioctl_cmd on windows I believe
> is an unsigned long and not an int like on unix platforms.
Note that at the top of each file it says (inside an ARCH_PC_WIN95 #ifdef):
#define ioctl ioctlsocket
But I'm not seeing this on Windows -- I'm seeing it on Linux. So
please take it serious. The code still looks broken to me, and that's
the only explanation I have for the disconnects I see in our app. (I
can also easily trigger those disconnects with a little test program.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Spread-users