mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-03 08:25:46 +00:00
Previously the proxy.go would directly call `os.Exit`. This patch causes control to return to `main` where we can tear down any port forward. Signed-off-by: David Scott <dave.scott@docker.com>
19 lines
215 B
Go
19 lines
215 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"pkg/proxy"
|
|
)
|
|
|
|
func main() {
|
|
host, container := parseHostContainerAddrs()
|
|
|
|
err := proxyForever(proxy.NewProxy(host, container))
|
|
|
|
if err != nil {
|
|
os.Exit(0)
|
|
}
|
|
os.Exit(1)
|
|
}
|