Skip to content

Commit 32afd5b

Browse files
committed
fix: use CLIENT_PROTOCOL_DATA_STREAM_RPC constant instead of magic number
1 parent 92c72f0 commit 32afd5b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/room/rpc/client/RpcClientManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export default class RpcClientManager extends (EventEmitter as new () => TypedEm
7272
const payloadBytes = byteLength(payload);
7373

7474
// Only enforce the legacy size limit when on rpc v1
75-
if (payloadBytes > MAX_V1_PAYLOAD_BYTES && remoteClientProtocol < 1) {
75+
if (
76+
payloadBytes > MAX_V1_PAYLOAD_BYTES &&
77+
remoteClientProtocol < CLIENT_PROTOCOL_DATA_STREAM_RPC
78+
) {
7679
throw RpcError.builtIn('REQUEST_PAYLOAD_TOO_LARGE');
7780
}
7881

0 commit comments

Comments
 (0)