We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bind to ipv4 ports
binds only to ipv6 ports
Compile the example code and check listening ports. Only ipv6 will be listening.
package main import ( "net/http" "github.com/labstack/echo" "github.com/labstack/echo/middleware" ) // Handler func hello(c echo.Context) error { return c.String(http.StatusOK, "Hello, World!") } func main() { // Echo instance e := echo.New() // Middleware e.Use(middleware.Logger()) e.Use(middleware.Recover()) // Routes e.GET("/", hello) // Start server e.Logger.Fatal(e.Start(":1323")) }
The work around: in 'echo.go' change "tcp" to "tcp4"
func newListener(address string) (*tcpKeepAliveListener, error) { l, err := net.Listen("tcp", address) if err != nil { return nil, err } return &tcpKeepAliveListener{l.(*net.TCPListener)}, nil }
The text was updated successfully, but these errors were encountered:
I uploaded #1667 to fix this issue
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Issue Description on most dual stack machines only ipv6 will bind as a listener.
Checklist
Expected behaviour
bind to ipv4 ports
Actual behaviour
binds only to ipv6 ports
Steps to reproduce
Compile the example code and check listening ports. Only ipv6 will be listening.
Working code to debug
The work around: in 'echo.go' change "tcp" to "tcp4"
Version/commit
The text was updated successfully, but these errors were encountered: