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
|
c.p.Strict = false
|
||||||
for {
|
for {
|
||||||
c.nextMutex.Lock()
|
c.nextMutex.Lock()
|
||||||
to, err := c.p.RawToken()
|
t, err := c.p.RawToken()
|
||||||
if err != nil || to == nil {
|
if err != nil || t == nil {
|
||||||
c.nextMutex.Unlock()
|
c.nextMutex.Unlock()
|
||||||
return xml.EndElement{}, err
|
return xml.EndElement{}, err
|
||||||
}
|
}
|
||||||
t := xml.CopyToken(to)
|
|
||||||
switch t := t.(type) {
|
switch t := t.(type) {
|
||||||
case xml.EndElement:
|
case xml.EndElement:
|
||||||
c.nextMutex.Unlock()
|
c.nextMutex.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user