<div dir="ltr">So I missed this when it was up for review, but I think the approach it takes is actually incorrect.<div><br></div><div>The patch as it stands sorts the list that we supplied to put 'localhost' addresses first. However, that interferes with the logic that we want to put "the last one we successfully connected to" first.</div>
<div><br></div><div>Now, the fix *might* just be to use "sort.Stable" instead of just "sort.Sort".  As long as all the things that aren't "localhost" aren't moved around, then we can keep the property that whatever you successfully connected to last time, you'll try to use next time.<br>
</div><div><br></div><div>Also, it would see the tests as written aren't actually valid because something named "localhost1" is not localhost. It should probably be "localhost:1" if we want to use that syntax.</div>
<div><br></div><div>John</div><div>=:-></div></div>