Skip to content

Commit

Permalink
Fix crash in thread during system shutdown (#5700)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Mar 31, 2021
1 parent d925b47 commit b007291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/platform/Linux/ThreadStackManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ class ThreadStackManagerImpl : public ThreadStackManager
private:
struct DBusConnectionDeleter
{
void operator()(DBusConnection * aConnection) { dbus_connection_unref(aConnection); }
void operator()(DBusConnection * aConnection)
{
dbus_connection_close(aConnection);
dbus_connection_unref(aConnection);
}
};

using UniqueDBusConnection = std::unique_ptr<DBusConnection, DBusConnectionDeleter>;
Expand Down

0 comments on commit b007291

Please sign in to comment.