[dancer-users] Dancer1 dev release 1.3300 released - new stable release expected soon

David Precious davidp at preshweb.co.uk
Tue Feb 16 14:33:13 GMT 2016


On Mon, 15 Feb 2016 17:01:37 -0700
Warren Young <wyml at etr-usa.com> wrote:

> On Feb 15, 2016, at 2:37 PM, David Precious <davidp at preshweb.co.uk>
> wrote:
> > 
> > - Avoid test failures due to race condition in selecting a port to
> > listen on by using 127.0.0.10 instead (more of a hacky workaround
> > than a fix, but should help (bigpresh)
> 
> You’re aware that the localhost IP block is /8, right?  You could do:
> 
>    my $ip = int(rand(2e24)) & 0x7F000000;
> 
> to reduce the chance of collision to roughly 1 in 8 million, if I’m
> doing my probabilities correct.  (2e24 / 2 for a 50/50 hit chance?)

True enough.  At least this way it's repeatable though, unlike if it's
random.  I think it should be sufficient.





More information about the dancer-users mailing list