mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-02 20:30:43 +00:00
npc bug
This commit is contained in:
parent
2330935b90
commit
1e8180014d
@ -163,7 +163,7 @@ re:
|
|||||||
|
|
||||||
//create local server secret or p2p
|
//create local server secret or p2p
|
||||||
for _, v := range cnf.LocalServer {
|
for _, v := range cnf.LocalServer {
|
||||||
go startLocalServer(v, cnf.CommonConfig)
|
go StartLocalServer(v, cnf.CommonConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Close()
|
c.Close()
|
||||||
|
@ -46,7 +46,7 @@ func startLocalFileServer(config *config.CommonConfig, t *file.Tunnel, vkey stri
|
|||||||
logs.Error(srv.Serve(listener))
|
logs.Error(srv.Serve(listener))
|
||||||
}
|
}
|
||||||
|
|
||||||
func startLocalServer(l *config.LocalServer, config *config.CommonConfig) error {
|
func StartLocalServer(l *config.LocalServer, config *config.CommonConfig) error {
|
||||||
listener, err := net.ListenTCP("tcp", &net.TCPAddr{net.ParseIP("0.0.0.0"), l.Port, ""})
|
listener, err := net.ListenTCP("tcp", &net.TCPAddr{net.ParseIP("0.0.0.0"), l.Port, ""})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Error("local listener startup failed port %d, error %s", l.Port, err.Error())
|
logs.Error("local listener startup failed port %d, error %s", l.Port, err.Error())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user