Software / code / verse
Comparison
init.lua @ 327:963d156a4b36
verse: Really pass the connection to ondisconnect, not some unknown global
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 10 Feb 2013 04:20:44 +0100 |
| parent | 325:843fabce2fc7 |
| child | 328:55e3fd7b9731 |
comparison
equal
deleted
inserted
replaced
| 326:f657ed8f464e | 327:963d156a4b36 |
|---|---|
| 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(); |
| 152 self.conn:close(); | 152 self.conn:close(); |
| 153 on_disconnect(conn, reason); | 153 on_disconnect(self.conn, reason); |
| 154 end | 154 end |
| 155 | 155 |
| 156 -- Logging functions | 156 -- Logging functions |
| 157 function stream:debug(...) | 157 function stream:debug(...) |
| 158 return self.logger("debug", ...); | 158 return self.logger("debug", ...); |