diff -r ce349990bd21 -r 73f466054ead client.lua --- a/client.lua Sat Nov 28 22:29:09 2009 +0000 +++ b/client.lua Sat Nov 28 22:29:29 2009 +0000 @@ -65,3 +65,10 @@ self:send(st.stanza("stream:stream", { to = self.host, ["xmlns:stream"]='http://etherx.jabber.org/streams', xmlns = "jabber:client" }):top_tag()); end +function stream:close(reason) + if not self.notopen then + self:send(""); + end + self.conn:close(); +end +