Skip to content

echo can't bind ipv6 address #826

Description

@blackbeans

when i use ipv6 to run my code
error message output:

listen tcp [fe80::216:3eff:fe2c:e43e]:19090: bind: invalid argument

and then i read echo source code find server listen created by default way:

 func newListener(address string) (*tcpKeepAliveListener, error) {
	l, err := net.Listen("tcp", address)
	if err != nil {
		return nil, err
	}
	return &tcpKeepAliveListener{l.(*net.TCPListener)}, nil
}

tcp may be only bind address by tcp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions