Add error handling in case server socket fails
This commit is contained in:
parent
bdfd0a9be1
commit
96117a64b3
6
main.go
6
main.go
|
@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue