aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-07 20:51:34 +0200
committerKim Alvefur <zash@zash.se>2016-08-07 20:51:34 +0200
commit8631e529ba01d20a36f451029c450d97ef5c07af (patch)
tree82c552e8637a3f16f7d4fff1c54ecce80b03ee08 /plugins
parent0c9ea080152cf2adf57c521e4c8184c595eaf107 (diff)
downloadprosody-8631e529ba01d20a36f451029c450d97ef5c07af.tar.gz
prosody-8631e529ba01d20a36f451029c450d97ef5c07af.zip
mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 71da8773..1b5dd91a 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -294,7 +294,10 @@ function listener.onreadtimeout(conn)
end
local function keepalive(event)
- return event.session.send(' ');
+ local session = event.session;
+ if not session.notopen then
+ return event.session.send(' ');
+ end
end
function listener.associate_session(conn, session)