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:
parent
0953ea55a5
commit
ebe14faf4c
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user