[PATCH] Core: configurable listening try number

Han Cheng hc0606 at gmail.com
Mon Apr 7 15:44:18 UTC 2014


Hello, Maxim,

As I'm new to nginx, please point out if I'm wrong.

The reason why we should have multiply tries is we may fail when we bind().
That is because the address and port
are in use(temporary which  caused by unclean close or others, permanent
like another nginx is using) or others.

In the temporary use case, we may wait and retry. Configurable retry make
us more probable succeed in that case.

By the way, one other TODO in the source code is the configurable wait
time. I think we do not need it when we have
retry.

Anyway, in most cases, we succeed in the first try and go on.

Thanks


2014-04-07 21:46 GMT+08:00 Maxim Dounin <mdounin at mdounin.ru>:

> Hello!
>
> On Mon, Apr 07, 2014 at 04:34:52PM +0800, Han Cheng wrote:
>
> >
> > Hello, there,
> >
> > I'm a new guy to nginx.
> > Recently, I'm reading the source code. I found some TODOs. I'm trying to
> > implement some. This is my first small attempt.
> >
> > Any suggestion?
>
> It doesn't looks like it actually needs to be configurable.  I
> don't recall any single request to make this configurable, nor any
> single use case where it may help.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>



-- 
Best regards,
Cheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140407/c10c10a1/attachment.html>


More information about the nginx-devel mailing list