From ebe14faf4c99c733cdebb1728f08e01e4943e168 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sat, 21 Oct 2017 13:51:19 -0600 Subject: [PATCH] Better help message if server is down --- connect.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/connect.go b/connect.go index 21375a61..4d910fa0 100644 --- a/connect.go +++ b/connect.go @@ -180,7 +180,12 @@ func (c *Connection) runClient() error { port := strconv.Itoa(27001 + id) connection, err := net.Dial("tcp", c.Server+":"+port) if err != nil { - panic(err) + if c.Server == "cowyo.com" { + fmt.Println("\nThe public server is down. Please tweet the webmaster: @yakczar") + } else { + fmt.Printf("\nCould not connect to relay %s\n", c.Server) + } + os.Exit(1) } defer connection.Close()