From 9639a2e0886f27b452ab8927a86f00e5827dda3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Valls=20Fern=C3=A1ndez?= Date: Sun, 15 Mar 2020 18:57:44 +0100 Subject: [PATCH] Show an error when local network unavailable --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 14d5a6f..e5f45c7 100644 --- a/main.go +++ b/main.go @@ -54,6 +54,10 @@ func main() { filePath := os.Args[1] fileName := filepath.Base(filePath) ip := getIP() + if ip == "" { + showError("Could not find LAN address") + return + } ln, err := net.Listen("tcp", ip+":0") if err != nil {