fix(main): fix openim scripts start rpc log (#1877)

* Update start.go

* Update start.go
pull/1883/head
Xinwei Xiong 10 months ago committed by GitHub
parent 8729f90d02
commit 9610da9123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -17,7 +17,6 @@ package startrpc
import (
"errors"
"fmt"
"log"
"net"
"net/http"
"os"
@ -117,7 +116,8 @@ func Start(
// Create a HTTP server for prometheus.
httpServer := &http.Server{Handler: promhttp.HandlerFor(reg, promhttp.HandlerOpts{}), Addr: fmt.Sprintf("0.0.0.0:%d", prometheusPort)}
if err := httpServer.ListenAndServe(); err != nil {
log.Fatal("Unable to start a http server. ", err.Error(), "PrometheusPort:", prometheusPort)
fmt.Fprintf(os.Stderr, "\n\nexit -1: \n%+v PrometheusPort: %d \n\n", err, prometheusPort)
os.Exit(-1)
}
}
return nil

Loading…
Cancel
Save