Skip to content

Commit cd2c248

Browse files
fix IllegalArgumentException when rpc is over 15K
1 parent d8fc346 commit cd2c248

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ internal constructor(
980980
identities: List<Identity>? = null,
981981
): Result<Unit> {
982982
if (data.size > RTCEngine.MAX_DATA_PACKET_SIZE) {
983-
throw IllegalArgumentException("cannot publish data larger than " + RTCEngine.MAX_DATA_PACKET_SIZE)
983+
return Result.failure(IllegalArgumentException("cannot publish data larger than " + RTCEngine.MAX_DATA_PACKET_SIZE))
984984
}
985985

986986
val kind = when (reliability) {

0 commit comments

Comments
 (0)