From b752357c8dadc941b704981bfd24e849437eb95a Mon Sep 17 00:00:00 2001 From: Matt Goodall Date: Mon, 9 Jul 2012 15:04:57 +0100 Subject: [PATCH] Remap EOF to ErrUnexpectedEOF now we're checking for end of stream. --- src/xmpp/stream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xmpp/stream.go b/src/xmpp/stream.go index db864af..8af222f 100644 --- a/src/xmpp/stream.go +++ b/src/xmpp/stream.go @@ -104,6 +104,9 @@ func (stream *Stream) Next(match *xml.Name) (*xml.StartElement, error) { for { t, err := stream.dec.Token() if err != nil { + if err == io.EOF { + err = io.ErrUnexpectedEOF + } return nil, err } switch e := t.(type) {