Software /
code /
verse
Comparison
init.lua @ 331:d23bb21668a7
verse: Fix disconnected event for unassociated connections
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 10 Feb 2013 18:06:43 +0100 |
parent | 330:44d2bd1cee46 |
child | 361:451dbad2a8e6 |
comparison
equal
deleted
inserted
replaced
330:44d2bd1cee46 | 331:d23bb21668a7 |
---|---|
227 function conn_listener.onincoming(conn, data) | 227 function conn_listener.onincoming(conn, data) |
228 stream:event("incoming-raw", data); | 228 stream:event("incoming-raw", data); |
229 end | 229 end |
230 | 230 |
231 function conn_listener.ondisconnect(conn, err) | 231 function conn_listener.ondisconnect(conn, err) |
232 if conn.conn ~= stream.conn then return end | 232 if conn ~= stream.conn then return end |
233 stream.connected = false; | 233 stream.connected = false; |
234 stream:event("disconnected", { reason = err }); | 234 stream:event("disconnected", { reason = err }); |
235 end | 235 end |
236 | 236 |
237 function conn_listener.ondrain(conn) | 237 function conn_listener.ondrain(conn) |