func (a *Agent) Leave() error {
	if a.client != nil {
		if err := a.client.Leave(); err != nil {
			a.logger.Printf("[ERR] agent: client leave failed: %v", err)
		}
	}
	if a.server != nil {
		if err := a.server.Leave(); err != nil {
			a.logger.Printf("[ERR] agent: server leave failed: %v", err)
		}
	}
	return nil
}
// Leave is used gracefully exit. Clients will inform servers
// of their departure so that allocations can be rescheduled.
Leave is used gracefully exit. Clients will inform servers
of their departure so that allocations can be rescheduled.
// Leave is used gracefully exit . Clients will inform servers // of their departure so that allocations can be rescheduled .
func (a *Agent) Leave() error {
	if a.client != nil {
		if err := a.client.Leave(); err != nil {
			a.logger.Printf("[ERR] agent: client leave failed: %v", err)
		}
	}
	if a.server != nil {
		if err := a.server.Leave(); err != nil {
			a.logger.Printf("[ERR] agent: server leave failed: %v", err)
		}
	}
	return nil
}
func ( a * Agent ) Leave ( ) error { if a . client != nil { if err := a . client . Leave ( ) ; err != nil { a . logger . Printf ( " " , err ) } } if a . server != nil { if err := a . server . Leave ( ) ; err != nil { a . logger . Printf ( " " , err ) } } return nil }
Leave is used gracefully exit.
Leave is used gracefully exit .