dbus-sharp icon indicating copy to clipboard operation
dbus-sharp copied to clipboard

Connection.IsConnected is not set to false when connection to dbus is lost

Open steffen-kiess opened this issue 12 years ago • 0 comments

Currently, when the connection to dbus is lost (e.g. because the dbus sever is killed), Connection.Iterate() will return without setting Connection.IsConnected to false. A program using dbus-sharp then will call DBus.Iterate() again, causing 100% CPU load without doing anything.

The problem is that Transport.ReadMessageReal() returns null when the read from the socket return 0, but Connection.Iterate()/Connection.HandleMessage() do not take any action then msg is null (they probably should terminate the connection).

steffen-kiess avatar Nov 12 '13 10:11 steffen-kiess