141 self:event("outgoing-raw", data); |
141 self:event("outgoing-raw", data); |
142 return conn:write(data); |
142 return conn:write(data); |
143 end; |
143 end; |
144 end |
144 end |
145 |
145 |
146 function stream:close() |
146 function stream:close(reason) |
147 if not self.conn then |
147 if not self.conn then |
148 verse.log("error", "Attempt to close disconnected connection - possibly a bug"); |
148 verse.log("error", "Attempt to close disconnected connection - possibly a bug"); |
149 return; |
149 return; |
150 end |
150 end |
151 local on_disconnect = self.conn.disconnect(); |
151 local on_disconnect = self.conn.disconnect(); |