Remove http.ListenAndServe in wrong place
This commit is contained in:
parent
0430446d6d
commit
1aca93f250
6
main.go
6
main.go
@ -18,7 +18,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"strings"
|
"strings"
|
||||||
@ -38,8 +37,6 @@ import (
|
|||||||
"maunium.net/go/mautrix-whatsapp/database"
|
"maunium.net/go/mautrix-whatsapp/database"
|
||||||
"maunium.net/go/mautrix-whatsapp/database/upgrades"
|
"maunium.net/go/mautrix-whatsapp/database/upgrades"
|
||||||
"maunium.net/go/mautrix-whatsapp/types"
|
"maunium.net/go/mautrix-whatsapp/types"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -406,9 +403,6 @@ func (bridge *Bridge) Main() {
|
|||||||
bridge.Start()
|
bridge.Start()
|
||||||
bridge.Log.Infoln("Bridge started!")
|
bridge.Log.Infoln("Bridge started!")
|
||||||
|
|
||||||
http.Handle("/metrics", promhttp.Handler())
|
|
||||||
http.ListenAndServe("127.0.0.1:9093", nil)
|
|
||||||
|
|
||||||
c := make(chan os.Signal)
|
c := make(chan os.Signal)
|
||||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||||
<-c
|
<-c
|
||||||
|
Loading…
Reference in New Issue
Block a user