# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1543506802 -3600
# Node ID 86c431650dfd3b29bb3803cbef85a1467cbdb9b4
# Parent  597653fe8ea4cf32b9aa4ecf4114290d6fd1a5ca
net.websocket.frames: Prefer Lua 5.2 built-in bit module over LuaJIT version

When running on Lua 5.2 this makes sense since bit32 is usually already
loaded. It's sensible to prefer this going forward in case of
incompatibilities between the two variants.

diff -r 597653fe8ea4 -r 86c431650dfd net/websocket/frames.lua
--- a/net/websocket/frames.lua	Thu Nov 29 16:19:39 2018 +0100
+++ b/net/websocket/frames.lua	Thu Nov 29 16:53:22 2018 +0100
@@ -9,7 +9,7 @@
 local softreq = require "util.dependencies".softreq;
 local random_bytes = require "util.random".bytes;
 
-local bit = assert(softreq"bit" or softreq"bit32",
+local bit = assert(softreq"bit32" or softreq"bit",
 	"No bit module found. See https://prosody.im/doc/depends#bitop");
 local band = bit.band;
 local bor = bit.bor;