2

I'm testing out using DBus for inter process communication for an QT C++ project (Linux).

I'm not using the bus daemon and i'm using unix paths / sockets.

After navigating my way through the mysterious world that is QT DBUS all seemed to be going well, until i wanted to test the robustness of one of my interfaces.

After killing the server process en restarting it, the connection times out.. i cleanup the connection objects (client-side) and i try to re-connect to the server.

The client does not seem to be able to reconnect and i get the following errors: errName: org.freedesktop.DBus.Error.NoServer errMesage: Failed to connect to socket /tmp/abcd: Connection refused

Ive tried: - QDBusConnection::disconnectFromPeer(addr); - cleaning up all related object, so no references to the connection exist.

When i restart the client, it has no problems connecting to the (restarted) server.

Makaku00
  • 121
  • 5
  • 14

1 Answers1

0

Problem found! Seems to be a bug in Qt 4.8.x: https://bugreports.qt.io/browse/QTBUG-27973 https://codereview.qt-project.org/#/c/60709/

QDBusConnection::disconnectFromBus and QDBusConnection::disconnectFromPeer does not remove invalid connection

Makaku00
  • 121
  • 5
  • 14