add mux
This commit is contained in:
parent
c62a2573ea
commit
1c0caa4410
|
@ -61,7 +61,7 @@ func (t *Tester) startBot(status *Status) {
|
|||
case xmpp.PresenceTypeUnavailable:
|
||||
logPres.Debug("recv presence unavailable")
|
||||
default:
|
||||
logCTX.Warnf("recv presence unsupported: %s -> %s", pres.Type, xmpp.XMLChildrenString(pres))
|
||||
logPres.Warnf("recv presence unsupported: %s -> %s", pres.Type, xmpp.XMLChildrenString(pres))
|
||||
}
|
||||
case *xmpp.MessageClient:
|
||||
msg := element.(*xmpp.MessageClient)
|
||||
|
|
|
@ -32,6 +32,9 @@ func (t *Tester) Output() *Output {
|
|||
}
|
||||
links := make(map[string]*Link)
|
||||
|
||||
t.mux.Lock()
|
||||
defer t.mux.Unlock()
|
||||
|
||||
for from, status := range t.Status {
|
||||
output.Status = append(output.Status, status)
|
||||
if !status.Login {
|
||||
|
|
Reference in New Issue