forked from jshiffer/go-xmpp
Copy token in nextStart function.
Seebc81053dbc (commitcomment-140301890)
andbc81053dbc (commitcomment-140303962)
This commit is contained in:
parent
0c7ee22452
commit
bbd90cc04b
5
xmpp.go
5
xmpp.go
@ -1466,11 +1466,12 @@ type rosterItem struct {
|
||||
func (c *Client) nextStart() (xml.StartElement, error) {
|
||||
for {
|
||||
c.nextMutex.Lock()
|
||||
t, err := c.p.Token()
|
||||
if err != nil || t == nil {
|
||||
to, err := c.p.Token()
|
||||
if err != nil || to == nil {
|
||||
c.nextMutex.Unlock()
|
||||
return xml.StartElement{}, err
|
||||
}
|
||||
t := xml.CopyToken(to)
|
||||
switch t := t.(type) {
|
||||
case xml.StartElement:
|
||||
c.nextMutex.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user