verse.client: Fix two cases where we called methods on the base stream object instead of the current one

Thu, 30 Dec 2010 20:18:47 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 30 Dec 2010 20:18:47 +0000
changeset 171
741f5311d30c
parent 170
cb03e8ae2e30
child 172
1a32e9ae79d0

verse.client: Fix two cases where we called methods on the base stream object instead of the current one

client.lua file | annotate | diff | comparison | revisions
--- 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