1
0
mirror of https://github.com/schollz/croc.git synced 2024-12-26 15:24:38 +03:00

Better help message if server is down

This commit is contained in:
Zack Scholl 2017-10-21 13:51:19 -06:00
parent 0953ea55a5
commit ebe14faf4c

View File

@ -180,7 +180,12 @@ func (c *Connection) runClient() error {
port := strconv.Itoa(27001 + id) port := strconv.Itoa(27001 + id)
connection, err := net.Dial("tcp", c.Server+":"+port) connection, err := net.Dial("tcp", c.Server+":"+port)
if err != nil { 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() defer connection.Close()