-
Notifications
You must be signed in to change notification settings - Fork 523
Bind to both IPv4 and IPv6 when localhost is specified (#231). #870
Conversation
|
||
if (parsedAddress.Host.Equals("localhost", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
var exceptions = new List<Exception>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating and adding to a list just to get a count? Why not just use a counter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that was different before and I didn't revert this. I was throwing an AggregateException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that might be better?
Travis is producing a bunch of |
d6eadc9
to
a5e15f6
Compare
|
||
// Make sure we bind to the same port on port 0. | ||
var port = ipv4Address.Port; | ||
var ipv6Address = parsedAddress.WithHost("[::1]").WithPort(port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more clear now 👍
No more filters. |
|
dbbda16
to
373d0ac
Compare
Updated to disallow binding to |
} | ||
|
||
// Make sure we bind to the same port on port 0. | ||
var port = ipv4Address.Port; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this logic since we no longer support localhost:0
.
85d9a33
to
6da59d5
Compare
🔔 |
@@ -81,7 +81,6 @@ public void NoDelay(bool enable) | |||
/// </summary> | |||
public static IPEndPoint CreateIPEndpoint(ServerAddress address) | |||
{ | |||
// TODO: IPv6 support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave this comment in for now. I can remove it when I fix #766.
You can |
e033a33
to
a3d0bd0
Compare
#231
cc @halter73 @mikeharder @Tratcher