diff options
author | Simon McVittie <smcv@collabora.com> | 2018-07-12 12:51:38 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-08-02 17:16:43 +0100 |
commit | 8177bbcf5262724d9bc5538b81aa366a51fbd520 (patch) | |
tree | a3725a7039c4b8f8c23f93485233778a6429cf65 /test/internals | |
parent | 620406f7574f8078d4927ce6e2cc9e1491a4e893 (diff) | |
download | dbus-8177bbcf5262724d9bc5538b81aa366a51fbd520.tar.gz |
tests: Detach most connections from main loop before closing
We don't need to do this for connections that were never set up
with the main loop.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
Diffstat (limited to 'test/internals')
-rw-r--r-- | test/internals/refs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/internals/refs.c b/test/internals/refs.c index 89f581aa..c0f75128 100644 --- a/test/internals/refs.c +++ b/test/internals/refs.c @@ -341,6 +341,7 @@ test_connection (Fixture *f, /* Destroy the connection. This should be the last-unref. */ g_assert (!f->last_unref); + test_connection_shutdown (f->loop, f->connection); dbus_connection_close (f->connection); dbus_connection_unref (f->connection); f->connection = NULL; @@ -593,12 +594,14 @@ teardown (Fixture *f, { if (f->server_connection != NULL) { + test_connection_shutdown (f->loop, f->server_connection); dbus_connection_close (f->server_connection); dbus_connection_unref (f->server_connection); } if (f->connection != NULL) { + test_connection_shutdown (f->loop, f->connection); dbus_connection_close (f->connection); dbus_connection_unref (f->connection); } |