Subject: [Patch] Fix reading from a tcp socket

[Patch] Fix reading from a tcp socket

From: Ghennadi Procopciuc <gprocopciuc_at_ixiacom.com>
Date: Wed, 25 Jul 2012 08:29:12 +0000

Hi all,

We discovered a bug that occurs in two situations :

1.When many responses come simultaneously, c-ares reads only the first; after that,
   it awaits another notification for each of them. However, until a read does not return EAGAIN
   epoll does not send notifications for that socket anymore.

2.A big DNS message is divided in several IP packets, c-ares is expected to read
   the full message or to receive EAGAIN. This works appropriately for UDP but not TCP.

I attached a patch that fixes these issues.

Thanks,
Ghennadi

Received on 2012-07-25