aboutsummaryrefslogtreecommitdiffstats
path: root/net/websocket
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-10-06 16:06:22 +0200
committerKim Alvefur <zash@zash.se>2015-10-06 16:06:22 +0200
commite0db9dc96086f51c68bf8c7ed55fb166dc5a5e83 (patch)
tree5d57dee1fac8577b487ebc5e9aa520da8f01e4cf /net/websocket
parent8a93612482f3fce85965dd13f2c33c7864fedb4d (diff)
downloadprosody-e0db9dc96086f51c68bf8c7ed55fb166dc5a5e83.tar.gz
prosody-e0db9dc96086f51c68bf8c7ed55fb166dc5a5e83.zip
net.websocket.frames: Simplify import of bitlib
Diffstat (limited to 'net/websocket')
-rw-r--r--net/websocket/frames.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua
index fa0e130d..23f18437 100644
--- a/net/websocket/frames.lua
+++ b/net/websocket/frames.lua
@@ -10,9 +10,7 @@ local softreq = require "util.dependencies".softreq;
local log = require "util.logger".init "websocket.frames";
local random_bytes = require "util.random".bytes;
-local bit;
-pcall(function() bit = require"bit"; end);
-bit = bit or softreq"bit32"
+local bit = softreq"bit" or softreq"bit32";
if not bit then log("error", "No bit module found. Either LuaJIT 2, lua-bitop or Lua 5.2 is required"); end
local band = bit.band;
local bor = bit.bor;