Code

client: Don't use select() before reading from a client connection.
authorSebastian Harl <sh@tokkee.org>
Wed, 28 Jan 2015 15:17:47 +0000 (16:17 +0100)
committerSebastian Harl <sh@tokkee.org>
Wed, 28 Jan 2015 15:17:47 +0000 (16:17 +0100)
This doesn't work well if the connection buffers data (like with the upcoming
SSL support).

src/client/sock.c

index cb506a55565f52cf3400f21d6a29a38b17ebb96c..f9929dacd3c63eedb3919400d210e77445f55771 100644 (file)
@@ -384,9 +384,6 @@ sdb_client_recv(sdb_client_t *client,
        while (42) {
                ssize_t status;
 
-               if (sdb_select(client->fd, SDB_SELECTIN))
-                       return -1;
-
                errno = 0;
                status = client->read(client, buf, req);
                if (status < 0) {