Software /
code /
verse
Changeset
171:741f5311d30c
verse.client: Fix two cases where we called methods on the base stream object instead of the current one
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 30 Dec 2010 20:18:47 +0000 |
parents | 170:cb03e8ae2e30 |
children | 172:1a32e9ae79d0 |
files | client.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);