Skip to content

Commit

Permalink
Disable multiplexing (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmelchior authored May 23, 2023
1 parent 58b3c87 commit de4f9fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ expect object RealmInterop {
basePath: String
)

fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean)

fun realm_set_log_callback(level: CoreLogLevel, callback: LogCallback)

fun realm_set_log_level(level: CoreLogLevel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,10 @@ actual object RealmInterop {
realmc.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath)
}

actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) {
realmc.realm_sync_client_config_set_multiplex_sessions(syncClientConfig.cptr(), enabled)
}

actual fun realm_set_log_callback(level: CoreLogLevel, callback: LogCallback) {
realmc.set_log_callback(level.priority, callback)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2290,6 +2290,10 @@ actual object RealmInterop {
realm_wrapper.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath)
}

actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) {
realm_wrapper.realm_sync_client_config_set_multiplex_sessions(syncClientConfig.cptr(), enabled)
}

actual fun realm_set_log_callback(level: CoreLogLevel, callback: LogCallback) {
realm_wrapper.realm_set_log_callback(
staticCFunction { userData, logLevel, message ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class)
syncRootDirectory
)

// Disable multiplexing. See https://github.com/realm/realm-core/issues/6656
RealmInterop.realm_sync_client_config_set_multiplex_sessions(syncClientConfig, false)

encryptionKey?.let {
RealmInterop.realm_sync_client_config_set_metadata_encryption_key(
syncClientConfig,
Expand Down

0 comments on commit de4f9fc

Please sign in to comment.