forked from jshiffer/go-xmpp
Don't copy token.
This should be unnecessary and is probably a leftover of previous experiments to fix some races when closing the connection.
This commit is contained in:
parent
94ab540b80
commit
bc81053dbc
5
xmpp.go
5
xmpp.go
@ -1490,12 +1490,11 @@ func (c *Client) nextEnd() (xml.EndElement, error) {
|
||||
c.p.Strict = false
|
||||
for {
|
||||
c.nextMutex.Lock()
|
||||
to, err := c.p.RawToken()
|
||||
if err != nil || to == nil {
|
||||
t, err := c.p.RawToken()
|
||||
if err != nil || t == nil {
|
||||
c.nextMutex.Unlock()
|
||||
return xml.EndElement{}, err
|
||||
}
|
||||
t := xml.CopyToken(to)
|
||||
switch t := t.(type) {
|
||||
case xml.EndElement:
|
||||
c.nextMutex.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user