diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-07 20:51:34 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-07 20:51:34 +0200 |
commit | 8631e529ba01d20a36f451029c450d97ef5c07af (patch) | |
tree | 82c552e8637a3f16f7d4fff1c54ecce80b03ee08 /plugins/mod_c2s.lua | |
parent | 0c9ea080152cf2adf57c521e4c8184c595eaf107 (diff) | |
download | prosody-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/mod_c2s.lua')
-rw-r--r-- | plugins/mod_c2s.lua | 5 |
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) |