Software /
code /
prosody
Comparison
plugins/mod_websocket.lua @ 7716:779a9ef6b4fd
mod_websocket: Set FIN flag on ping frames (fixes #773)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Nov 2016 13:28:10 +0100 |
parent | 7340:7dea28dafc49 |
child | 7760:801d4c8e0f58 |
comparison
equal
deleted
inserted
replaced
7715:08989f8464b9 | 7716:779a9ef6b4fd |
---|---|
291 end | 291 end |
292 | 292 |
293 local function keepalive(event) | 293 local function keepalive(event) |
294 local session = event.session; | 294 local session = event.session; |
295 if session.open_stream == session_open_stream then | 295 if session.open_stream == session_open_stream then |
296 return session.conn:write(build_frame({ opcode = 0x9, })); | 296 return session.conn:write(build_frame({ opcode = 0x9, FIN = true })); |
297 end | 297 end |
298 end | 298 end |
299 | 299 |
300 module:hook("c2s-read-timeout", keepalive, -0.9); | 300 module:hook("c2s-read-timeout", keepalive, -0.9); |
301 | 301 |