aboutsummaryrefslogtreecommitdiffstats
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
commit797d1592b92cae24c3caff86b8afe4373937c7fc (patch)
tree82c552e8637a3f16f7d4fff1c54ecce80b03ee08
parente7fdb25beaf6c03b752dc7efe32fa2cde2311bf1 (diff)
downloadprosody-797d1592b92cae24c3caff86b8afe4373937c7fc.tar.gz
prosody-797d1592b92cae24c3caff86b8afe4373937c7fc.zip
mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open
-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)