diff --git a/autobahn/util.py b/autobahn/util.py index c3d3f4786..a66b26f28 100644 --- a/autobahn/util.py +++ b/autobahn/util.py @@ -279,7 +279,7 @@ def __next__(self): # 8 byte mask with 53 LSBs set (WAMP requires IDs from [1, 2**53] -_WAMP_ID_MASK = struct.unpack("@Q", b"\x00\x1f\xff\xff\xff\xff\xff\xff")[0] +_WAMP_ID_MASK = struct.unpack(">Q", b"\x00\x1f\xff\xff\xff\xff\xff\xff")[0] def rid(): @@ -298,7 +298,7 @@ def rid(): :returns: A random integer ID. :rtype: int """ - return struct.unpack("@Q", os.urandom(8))[0] & _WAMP_ID_MASK or 2 ** 53 + return struct.unpack(">Q", os.urandom(8))[0] & _WAMP_ID_MASK or 2 ** 53 # noinspection PyShadowingBuiltins