# HG changeset patch # User Kim Alvefur # Date 1360468337 -3600 # Node ID 2787e038bea26e723f089ae4d7c673b6d2805648 # Parent 55e3fd7b973139292c732d3ed445fc9c29a8ed2a verse.client: Use a different flag to indicate that our outgoing stream is closed diff -r 55e3fd7b9731 -r 2787e038bea2 client.lua --- a/client.lua Sun Feb 10 04:29:20 2013 +0100 +++ b/client.lua Sun Feb 10 04:52:17 2013 +0100 @@ -32,9 +32,10 @@ end function stream_callbacks.streamclosed(stream) - if not stream.notopen then + stream.notopen = true; + if not stream.closed then stream:send(""); - stream.notopen = true; + stream.closed = true; end stream:event("closed"); return stream:close("stream closed") @@ -135,9 +136,9 @@ local _base_close = self.close; function self:close(reason) self.close = _base_close; - if not self.notopen then + if not self.closed then self:send(""); - self.notopen = true; + self.closed = true; else return self:close(reason); end