Skip to content
  • Philip Withnall's avatar
    gdbusserver: Keep a strong reference to the server in callbacks · 0c07e672
    Philip Withnall authored
    
    
    The `on_run()` function could be executed in any worker thread from the
    `GThreadedSocketListener`, but didn’t previously hold a strong reference
    to the `GDBusServer`, which meant the server could be finalised in
    another thread while `on_run()` was still running.
    
    This was not ideal.
    
    Hold a strong reference to the `GDBusServer` while the socket listener
    is listening, i.e. between every paired call to `g_dbus_server_start()`
    and `g_dbus_server_stop()`.
    
    Signed-off-by: default avatarPhilip Withnall <withnall@endlessm.com>
    
    Fixes: #1318
    0c07e672