Software /
code /
prosody
Changeset
6456:a8d9d3eea6f4
Merge 0.10->trunk
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Mon, 29 Sep 2014 13:59:16 -0400 |
parents | 6454:6842b07fc7bc (current diff) 6455:b6514e691a70 (diff) |
children | 6465:ab68bb837fe0 |
files | |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/net/websocket.lua Fri Sep 26 17:44:14 2014 -0400 +++ b/net/websocket.lua Mon Sep 29 13:59:16 2014 -0400 @@ -134,7 +134,7 @@ log("debug", "closing WebSocket with code %i: %s" , code , tostring(reason)); self.readyState = 2; local handler = self.handler; - handler:write(frames.build_close(code, reason)); + handler:write(frames.build_close(code, reason, true)); -- Do not close socket straight away, wait for acknowledgement from server. self.close_timer = timer.add_task(close_timeout, close_timeout_cb, self); elseif self.readyState == 2 then
--- a/net/websocket/frames.lua Fri Sep 26 17:44:14 2014 -0400 +++ b/net/websocket/frames.lua Mon Sep 29 13:59:16 2014 -0400 @@ -171,7 +171,7 @@ return code, message end -local function build_close(code, message) +local function build_close(code, message, mask) local data = pack_uint16be(code); if message then assert(#message<=123, "Close reason must be <=123 bytes"); @@ -180,7 +180,7 @@ return build_frame({ opcode = 0x8; FIN = true; - MASK = true; + MASK = mask; data = data; }); end