Add error handling in case server socket fails

This commit is contained in:
Jan Philipp Timme 2019-05-12 21:14:15 +02:00
parent bdfd0a9be1
commit 96117a64b3
1 changed files with 5 additions and 1 deletions

View File

@ -43,5 +43,9 @@ func handleMtaConnection(clientConnection *bufio.ReadWriter) {
func main() { func main() {
logger = logging.NewLogger(os.Stdout, os.Stderr, logging.DEBUG) logger = logging.NewLogger(os.Stdout, os.Stderr, logging.DEBUG)
runServer() err := runServer()
if err != nil {
logger.Errorf("Could not run server: %s\n", err.Error())
os.Exit(1)
}
} }