Software /
code /
prosody
Diff
plugins/mod_net_multiplex.lua @ 6382:57d23c26039b
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 02 Sep 2014 22:33:11 +0200 |
parent | 6380:4220ffb87b22 |
child | 7502:021d2b844c51 |
child | 7806:00bca79ae778 |
line wrap: on
line diff
--- a/plugins/mod_net_multiplex.lua Tue Sep 02 17:58:12 2014 +0100 +++ b/plugins/mod_net_multiplex.lua Tue Sep 02 22:33:11 2014 +0200 @@ -34,7 +34,6 @@ function listener.onincoming(conn, data) if not data then return; end local buf = buffers[conn]; - buffers[conn] = nil; buf = buf and buf..data or data; for service, multiplex_pattern in pairs(available_services) do if buf:match(multiplex_pattern) then @@ -57,6 +56,8 @@ buffers[conn] = nil; -- warn if no buffer? end +listener.ondetach = listener.ondisconnect; + module:provides("net", { name = "multiplex"; config_prefix = "";