Open OCharless opened 10 months ago
Also note that the BgpServer
type has a Stop
method that will call the StopBgp
API method for you: https://github.com/osrg/gobgp/blob/815683fa5e0d1e210e436bfa589588d9d2c19015/pkg/server/server.go#L219-L225. Just calling Stop()
has been sufficient when I've used it.
Currently, the bgp server is running endlessly. It's goten shut down when the main program stops. This PR have as a purpose to supply an optional channel in order to stop gracefully the Serve method whenever it's needed.