projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adafe0b
)
mod_websocket: Fix read timeout handler (thanks mt)
author
Kim Alvefur
<zash@zash.se>
Wed, 6 Apr 2016 12:44:51 +0000
(14:44 +0200)
committer
Kim Alvefur
<zash@zash.se>
Wed, 6 Apr 2016 12:44:51 +0000
(14:44 +0200)
plugins/mod_websocket.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_websocket.lua
b/plugins/mod_websocket.lua
index 086eab62603bde1de809829bdbc0bf493559d340..a3f5318c9b54636f8caec1b747bf39fd56bd9033 100644
(file)
--- a/
plugins/mod_websocket.lua
+++ b/
plugins/mod_websocket.lua
@@
-291,7
+291,10
@@
function handle_request(event)
end
local function keepalive(event)
- return conn:write(build_frame({ opcode = 0x9, }));
+ local session = event.session;
+ if session.open_stream == session_open_stream then
+ return session.conn:write(build_frame({ opcode = 0x9, }));
+ end
end
module:hook("c2s-read-timeout", keepalive, -0.9);