1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-03-23 20:32:32 +02:00

fix http No release Broker (#2167)

* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed
This commit is contained in:
JeffreyBool 2021-05-13 20:07:25 +08:00 committed by GitHub
parent 32cb1b435b
commit 4c1f81dadb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,12 +300,14 @@ func (h *httpServer) Start() error {
}
}
ch <- ln.Close()
// deregister
h.Deregister()
opts.Broker.Disconnect()
// Solve the problem of early exit
ch <- ln.Close()
}()
return nil