Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-522

Users must be able to cleanup internal HttpEngine and Dispachers

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sync
    • None

      Currently, we are leaking HttpEngine from KtorNetworkTransport and various dispatchers when Realms are being closed.

      This can cause problems as surfaced here https://github.com/realm/realm-kotlin/issues/733 where the hypothesis is the running dispatchers prevent the JVM from closing.

      As discussed here https://github.com/realm/realm-kotlin/pull/817#issue-1220927930, the current approach where these resources are created by Configuration objects and potentially shared between many Realms/App make it impossible to safely stop them.

      Most likely we need to refactor these code paths, so the resources are created lazily and owned by each App / Realm, so they can safely be torn down when those classes are closed.

            Assignee:
            christian.melchior@mongodb.com Christian Melchior (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: