handle port binding err

This commit is contained in:
insanity 2017-07-31 17:11:49 +09:00
parent 6a5cb736ed
commit e881ebfad1
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"server": {
"addr": ":80",
"addr": ":8094",
"tls": false
},
"websocket": {

View File

@ -57,8 +57,9 @@ func main() {
http.Handle("/rpc", ws.HTTPHandler())
log.Printf("Address: %s, UseTLS: %t", addr, useTLS)
http.ListenAndServe(addr, nil)
if err := http.ListenAndServe(addr, nil); err != nil {
log.Fatal(err)
}
}
func loadConfig() *config.Config {