HELP: Check topics exist at startup, fix a bug

This commit is contained in:
Daniel Oaks 2016-10-23 18:59:13 +10:00
parent a7949b6cb4
commit 194fa9af9f
3 changed files with 71 additions and 30 deletions

View file

@ -114,6 +114,14 @@ func NewServer(configFilename string, config *Config) *Server {
return nil
}
// startup check that we have HELP entries for every command
for name := range Commands {
_, exists := Help[strings.ToLower(name)]
if !exists {
log.Fatal("Help entry does not exist for ", name)
}
}
if config.AuthenticationEnabled {
SupportedCapabilities[SASL] = true
}