mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:38:26 +00:00
refactor: remove unlimited by array size and cap at 10_000_000
This commit is contained in:
parent
4fff5ac2dc
commit
ccd9493f62
@ -79,7 +79,7 @@ class MessageSendJob(val message: Message, val destination: Destination) : Job {
|
||||
override fun serialize(): Data {
|
||||
val kryo = Kryo()
|
||||
kryo.isRegistrationRequired = false
|
||||
val output = Output(ByteArray(4096), -1) // maxBufferSize '-1' will dynamically grow internally if we run out of room serializing the message
|
||||
val output = Output(ByteArray(4096), 10_000_000) // maxBufferSize '-1' will dynamically grow internally if we run out of room serializing the message
|
||||
kryo.writeClassAndObject(output, message)
|
||||
output.close()
|
||||
val serializedMessage = output.toBytes()
|
||||
|
Loading…
x
Reference in New Issue
Block a user