ifix cliwq!

This commit is contained in:
Zack Scholl 2019-04-30 23:26:32 +00:00
parent ec8768bc70
commit 2c2c3f58ac
1 changed files with 3 additions and 3 deletions

View File

@ -214,20 +214,20 @@ func relay(c *cli.Context) (err error) {
if c.GlobalBool("debug") { if c.GlobalBool("debug") {
debugString = "debug" debugString = "debug"
} }
ports := strings.Split(c.GlobalString("ports"), ",") ports := strings.Split(c.String("ports"), ",")
tcpPorts := strings.Join(ports[1:], ",") tcpPorts := strings.Join(ports[1:], ",")
for i, port := range ports { for i, port := range ports {
if i == 0 { if i == 0 {
continue continue
} }
go func(portStr string) { go func(portStr string) {
err = tcp.Run(debugString, portStr, tcpPorts) err = tcp.Run(debugString, portStr)
if err != nil { if err != nil {
panic(err) panic(err)
} }
}(port) }(port)
} }
return tcp.Run(debugString, ports[0]) return tcp.Run(debugString, ports[0],tcpPorts)
} }
// func dirSize(path string) (int64, error) { // func dirSize(path string) (int64, error) {