Subject: Re: [PATCH] Correctly clear sockets from the fd_set on error

Re: [PATCH] Correctly clear sockets from the fd_set on error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 22 Sep 2007 23:25:43 +0200 (CEST)

On Sat, 22 Sep 2007, Steinar H. Gunderson wrote:

> Again the comments should rather self-explanatory; sometimes it happens that
> a socket is closed due to an error, in which case it is still erroneously in
> the fd_set, causing possible confusion if a new socket is opened and happens
> to get the same fd. This patch simply clears out the "ready" bits when
> processing the fds.

Thanks a lot, applied!

> By the way, I should probably note that while many of these patches have
> lived on a long time internally, and as such should be quite stable, there
> might crop up new bugs in the forward-porting. Please let me know if there's
> something that looks wrong or breaks -- I didn't write these patches, but I
> could probably get in touch with those that did.

Unfortunately we don't have a test suite for c-ares, but we do run numerous
automated daily builds and tests of curl and a bunch of them use c-ares so
changes are mistakes are found that way. The only other way is of course by
users...

-- 
   c-ares -- my preferred DNS asynch resolver library
Received on 2007-09-22