Software /
code /
prosody
Comparison
net/websocket.lua @ 8189:a3565d7dd304
net.websocket: Remove stray module api reference, shouldn't be used in here
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Jul 2017 18:47:43 +0200 |
parent | 7759:69706084bdfe |
child | 8892:fb38b2c77a72 |
comparison
equal
deleted
inserted
replaced
8188:8c524b7c9017 | 8189:a3565d7dd304 |
---|---|
36 function websocket_listeners.ondetach(handler) | 36 function websocket_listeners.ondetach(handler) |
37 websockets[handler] = nil; | 37 websockets[handler] = nil; |
38 end | 38 end |
39 | 39 |
40 local function fail(s, code, reason) | 40 local function fail(s, code, reason) |
41 module:log("warn", "WebSocket connection failed, closing. %d %s", code, reason); | 41 log("warn", "WebSocket connection failed, closing. %d %s", code, reason); |
42 s:close(code, reason); | 42 s:close(code, reason); |
43 s.handler:close(); | 43 s.handler:close(); |
44 return false | 44 return false |
45 end | 45 end |
46 | 46 |