test default config value

This commit is contained in:
shoopea 2020-02-10 10:23:55 +08:00
parent a84fdeae61
commit 163093ef67

View File

@ -29,12 +29,14 @@ func loadClients() error {
muxClients.Lock()
for _, c := range clts {
cx := ChirpClient{
Config: &ChirpConfig{
InterceptPillage: true,
}}
cx := ChirpClient{}
copier.Copy(&cx, &c)
cx.Active = false
if cx.Config == nil {
cx.Config = &ChirpConfig{
InterceptPillage: true,
}
}
/*
cx.MQ.Connection, err = amqp.Dial("amqp://" + cx.MQ.User + ":" + cx.MQ.Password + "@" + cx.MQ.Host + "/" + cx.MQ.Path)
logOnError(err, "loadClients : Failed to connect to RabbitMQ")