Fix MapRange over pointer crash
Some checks failed
Some checks failed
This commit is contained in:
parent
ebeb7f23d6
commit
f7f3a4d7e2
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ func (m *MQTT) publishComplex(topic string, retained bool, payload interface{})
|
|||
|
||||
case reflect.Map:
|
||||
// loop map
|
||||
for iter := reflect.ValueOf(m).MapRange(); iter.Next(); {
|
||||
for iter := reflect.ValueOf(payload).MapRange(); iter.Next(); {
|
||||
k := iter.Key().String()
|
||||
m.publishComplex(fmt.Sprintf("%s/%s", topic, k), retained, iter.Value().Interface())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue