Skip to content

Commit

Permalink
Show an error when local network unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Valls Fernández committed Mar 15, 2020
1 parent ea39e6b commit 9639a2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9639a2e

Please sign in to comment.