forked from jshiffer/go-xmpp
Use RawToken() instead of Token() for finding nextEnd.
This should improve stability as RawToken() does not verify that start and end elements match.
This commit is contained in:
parent
ea4874e8c9
commit
9c5e758356
2
xmpp.go
2
xmpp.go
@ -1461,7 +1461,7 @@ func nextStart(p *xml.Decoder) (xml.StartElement, error) {
|
|||||||
func nextEnd(p *xml.Decoder) (xml.EndElement, error) {
|
func nextEnd(p *xml.Decoder) (xml.EndElement, error) {
|
||||||
p.Strict = false
|
p.Strict = false
|
||||||
for {
|
for {
|
||||||
t, err := p.Token()
|
t, err := p.RawToken()
|
||||||
if err != nil || t == nil {
|
if err != nil || t == nil {
|
||||||
return xml.EndElement{}, err
|
return xml.EndElement{}, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user