client.lua

changeset 171
741f5311d30c
parent 166
3499b4ea3277
child 199
33b54389ed9c
--- 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);

mercurial