Added easier to read failed connection message

pull/42/head 2.4.2
Matthieu Grieger 2015-02-07 18:25:59 -08:00
parent c8c59c2970
commit 44e0d55d9d
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ MumbleDJ Changelog
* Added `!setcomment` which allows admin users to set the comment for the bot.
* Made "Now Playing" notification and `!currentsong` show the playlist title of the song if it is included in a playlist.
* Added ability to connect to Mumble server using a PEM cert/key pair. Use the commandline flags `cert` and `key` to make use of this.
* Added an easier to read error message upon unsuccessful connection to server.
### February 3, 2015 -- `v2.4.1`
* Made it possible to place MumbleDJ binary in `~/bin` instead of `/usr/local/bin` if the folder exists.

View File

@ -15,6 +15,7 @@ import (
"github.com/layeh/gumble/gumble"
"github.com/layeh/gumble/gumble_ffmpeg"
"github.com/layeh/gumble/gumbleutil"
"os"
"os/user"
)
@ -163,7 +164,8 @@ func main() {
// moment.
dj.config.TLSConfig.InsecureSkipVerify = true
if err := dj.client.Connect(); err != nil {
panic(err)
fmt.Printf("Could not connect to Mumble server at %s:%s.\n", address, port)
os.Exit(1)
}
<-dj.keepAlive