File tree Expand file tree Collapse file tree
commonMain/kotlin/com/piasy/kmp/socketio/engineio
jvmTest/kotlin/com/piasy/kmp/socketio/engineio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import kotlin.jvm.JvmField
1717class EngineSocket (
1818 uri : String ,
1919 @JvmField internal val opt : Options ,
20- private val scope : CoroutineScope ,
20+ internal val scope : CoroutineScope ,
2121 private val factory : TransportFactory = DefaultTransportFactory ,
2222 private val rawMessage : Boolean = false ,
2323) : Emitter() {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.piasy.kmp.socketio.socketio.Manager
66import com.piasy.kmp.socketio.socketio.Socket
77import kotlinx.coroutines.CoroutineScope
88import kotlinx.coroutines.Dispatchers
9+ import kotlinx.coroutines.launch
910import kotlinx.serialization.json.*
1011import org.json.JSONObject
1112
@@ -47,7 +48,9 @@ object TestUtil {
4748
4849 @JvmStatic
4950 fun closeEngineSocket (socket : Socket ) {
50- socket.io.engine?.close()
51+ socket.io.engine?.scope?.launch {
52+ socket.io.engine?.close()
53+ }
5154 }
5255
5356 @JvmStatic
You can’t perform that action at this time.
0 commit comments