Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to start with ipv6 address #2

Open
UnknownShadow200 opened this issue Apr 30, 2017 · 0 comments
Open

Failing to start with ipv6 address #2

UnknownShadow200 opened this issue Apr 30, 2017 · 0 comments

Comments

@UnknownShadow200
Copy link

UnknownShadow200 commented Apr 30, 2017

It gets stuck in 'Resolving external point'. This is due to this line:

IPEndPoint BindIPEndPointCallback( ServicePoint servicePoint, IPEndPoint remoteEndPoint,
    int retryCount ) {
        return new IPEndPoint( InternalIP, 0 );
}

InternalIP is an ipv4 address, so it ends up looping 2,147,483,647 times. However, because I have IPv6, it is using an ipv6 socket to connect to fcraft.net's IP check uri.

The simple fix is to do this instead: https://github.com/123DMWM/ProCraft/blob/b2ed46e61c9d533c421c85ef859cec8a94979f8e/fCraft/System/Server.cs#L1236

To also ensure that the external IP shown is the IPv4 address, you can prefer ipv4 connections with this https://github.com/123DMWM/ProCraft/blob/b2ed46e61c9d533c421c85ef859cec8a94979f8e/fCraft/System/Utils/HttpUtil.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant