mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Added ensure not main thread.
This commit is contained in:
parent
b13d0f7e81
commit
47ea3a3c42
1 changed files with 2 additions and 0 deletions
|
@ -66,6 +66,8 @@ class FCastSession(outputStream: OutputStream, private val _remoteSocketAddress:
|
||||||
val id = UUID.randomUUID()
|
val id = UUID.randomUUID()
|
||||||
|
|
||||||
fun send(opcode: Opcode, message: String? = null) {
|
fun send(opcode: Opcode, message: String? = null) {
|
||||||
|
ensureNotMainThread()
|
||||||
|
|
||||||
synchronized(_outputStreamLock) {
|
synchronized(_outputStreamLock) {
|
||||||
try {
|
try {
|
||||||
val data: ByteArray = message?.encodeToByteArray() ?: ByteArray(0)
|
val data: ByteArray = message?.encodeToByteArray() ?: ByteArray(0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue