]> granicus.if.org Git - python/commitdiff
SF patch #678257 by Geoff Talvola.
authorGuido van Rossum <guido@python.org>
Fri, 31 Jan 2003 18:15:58 +0000 (18:15 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 31 Jan 2003 18:15:58 +0000 (18:15 +0000)
In sendall(), do an internal select before each send() call, instead
of only for the first one.

Modules/socketmodule.c

index 2b0b79607909fc360ba5fac7ba276aefef4e5725..63ad50add529e1b9f18365332277eff95705d811 100644 (file)
@@ -1848,8 +1848,8 @@ sock_sendall(PySocketSockObject *s, PyObject *args)
                return NULL;
 
        Py_BEGIN_ALLOW_THREADS
-       internal_select(s, 1);
        do {
+               internal_select(s, 1);
                n = send(s->sock_fd, buf, len, flags);
                if (n < 0)
                        break;