Re: [Nbd] [PATCH 07/11] nbd-server: do not lose connections
- To: Wouter Verhelst <w@...112...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH 07/11] nbd-server: do not lose connections
- From: "Dmitry V. Levin" <ldv@...1147...>
- Date: Mon, 25 Jun 2012 02:55:27 +0400
- Message-id: <20120624225527.GB28212@...1147...>
- In-reply-to: <20120623233422.GL7471@...3...>
- References: <20120621214218.GG26247@...1147...> <20120623233422.GL7471@...3...>
On Sun, Jun 24, 2012 at 01:34:22AM +0200, Wouter Verhelst wrote:
> On Fri, Jun 22, 2012 at 01:42:19AM +0400, Dmitry V. Levin wrote:
> > When select reports that more than one connection is ready to be
> > accepted, handle them all instead of losing all of them but one.
>
> Mm. I might be mistaken, but I was under the impression that if you do
> it that way, select() will just return immediately next time and tell
> you that there's another socket ready for reading.
Actually, I was under a false impression that the old code could lose the
descriptor returned by accept(). Fortunately, there was a check that
didn't allow accept() to be called more than once per select(). So the
change is not a bug fix indeed.
> But, granted, this might be a slight bit faster, especially if you're
> exporting loads of files.
--
ldv
Reply to: