fix build issue

This commit is contained in:
smallnest
2017-10-27 15:06:17 +08:00
parent a93e1c4be0
commit e6abf8fc63
2 changed files with 7 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
package server
import (
"net"
reuseport "github.com/kavu/go_reuseport"
)
@@ -11,8 +12,8 @@ func init() {
makeListeners["reuseport"] = reuseportMakeListener
}
func reuseportMakeListener func(s *Server, address string) (ln net.Listener, err error) {
func reuseportMakeListener(s *Server, address string) (ln net.Listener, err error) {
var network string
if validIP4(address) {
network = "tcp4"
} else {
@@ -20,4 +21,4 @@ func reuseportMakeListener func(s *Server, address string) (ln net.Listener, err
}
return reuseport.NewReusablePortListener(network, address)
}
}