diff -r cb03e8ae2e30 -r 741f5311d30c client.lua --- a/client.lua Wed Dec 15 15:03:56 2010 +0000 +++ b/client.lua Thu Dec 30 20:18:47 2010 +0000 @@ -68,8 +68,8 @@ function self.data(conn, data) local ok, err = self.stream:feed(data); if ok then return; end - stream:debug("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " ")); - stream:close("xml-not-well-formed"); + self:debug("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " ")); + self:close("xml-not-well-formed"); end self:hook("incoming-raw", function (data) return self.data(self.conn, data); end);