Skip to content

Commit

Permalink
fix http No release Broker (micro#2167)
Browse files Browse the repository at this point in the history
* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed
  • Loading branch information
JeffreyBool authored May 13, 2021
1 parent 32cb1b4 commit 4c1f81d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/server/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c1f81d

Please sign in to comment.