go-dbus hangs when method call generates signals
Bug #1416352 reported by
Michael Vogt
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
go-dbus |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
When you have a signal watcher and call a dbus method that generates the signal msg before the message returns it causes go-dbus to hang and never return from the method call.
Attached is a example dbus python server (to ensure its not my bad go skillz) and a sample go client that show the behavior.
I commited a fix to my branch http://
Changed in go-dbus: | |
status: | New → Won't Fix |
assignee: | Samuele Pedroni (pedronis) → nobody |
To post a comment you must log in.
Here is my proposed patch. It adds a go-routine for each signalWatch. Note that the go watch.cb() referes to the go-dbus internal callback, this is not exposed publicly. The internal code that is run is sending the message to the watch.C channel.
My example go client could also be fixed by adding a go-routine for reading from watch.C. Bu tit seems to me that this is something that the library could do for me. If this is not done I think we need at least a big warning that you always need something that reads from watch.C or that it will deadlock (which honestly to me sounds like we should handle it in go-dbus instead).