<div dir="ltr">Talked with John etc. Sorting is really just a lazy man's out. There's no reason we can just search through the list and if localhost is there, dial that one first (actually we decided it should probably *only* dial localhost if it exists).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 1, 2014 at 8:21 AM, Andrew Wilkins <span dir="ltr"><<a href="mailto:andrew.wilkins@canonical.com" target="_blank">andrew.wilkins@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I haven't looked at the revision in question, so lack context, but just wanted to point out that sort.Stable is Go 1.2+</div>
<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Sun, Jun 1, 2014 at 6:05 PM, John Meinel <span dir="ltr"><<a href="mailto:john@arbash-meinel.com" target="_blank">john@arbash-meinel.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></font></span></blockquote></div><br></div>
<br>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></blockquote></div><br></div>