Merge 0.8->trunk
[prosody.git] / util / xmppstream.lua
index 7042042424ab984271979404a0772c707237d06c..e5271b7242a91a76024b68027c769cab9dabc949 100644 (file)
@@ -170,7 +170,7 @@ function new_sax_handlers(session, stream_callbacks)
 
        local function restricted_handler(parser)
                cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
-               if not parser:stop() then
+               if not parser.stop or not parser:stop() then
                        error("Failed to abort parsing");
                end
        end