diff --git a/signalrkore/build.gradle.kts b/signalrkore/build.gradle.kts index 9067db4..76ec733 100644 --- a/signalrkore/build.gradle.kts +++ b/signalrkore/build.gradle.kts @@ -30,6 +30,7 @@ kotlin { if (OperatingSystem.current().isMacOsX) { listOf( + iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> diff --git a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HttpHubConnectionBuilder.kt b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HttpHubConnectionBuilder.kt index 2a26266..9051b41 100644 --- a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HttpHubConnectionBuilder.kt +++ b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HttpHubConnectionBuilder.kt @@ -73,6 +73,7 @@ class HttpHubConnectionBuilder(private val url: String) { handshakeResponseTimeout, headers.toMap(), transportEnum, + null, json, logger, ) diff --git a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HubConnection.kt b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HubConnection.kt index 10b6645..97171ff 100644 --- a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HubConnection.kt +++ b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/HubConnection.kt @@ -18,6 +18,7 @@ import io.ktor.utils.io.core.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.IO import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancelChildren import kotlinx.coroutines.delay @@ -125,7 +126,7 @@ class HubConnection private constructor( } if (skipNegotiate && transportEnum != TransportEnum.WebSockets) - throw RuntimeException("Negotiation can only be skipped when using the WebSocket transport") + throw RuntimeException("Negotiation can only be skipped when using a WebSocket transport") val (negotiationTransport, negotiationUrl) = if (!skipNegotiate) { try { diff --git a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/transports/LongPollingTransport.kt b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/transports/LongPollingTransport.kt index b337b7e..50bd884 100644 --- a/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/transports/LongPollingTransport.kt +++ b/signalrkore/src/commonMain/kotlin/eu/lepicekmichal/signalrkore/transports/LongPollingTransport.kt @@ -13,6 +13,7 @@ import io.ktor.http.HttpStatusCode import io.ktor.http.contentLength import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel import kotlinx.coroutines.flow.Flow @@ -21,6 +22,7 @@ import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import kotlinx.datetime.Clock +import kotlin.jvm.Volatile internal class LongPollingTransport(private val headers: Map, private val client: HttpClient) : Transport {