-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Description
Hello @guelfey, the dbus is very useful, but I found a potential bug when I used it.
blocking position:
Line 302 in 7623695
| <-conn.ctx.Done() |
In the test function TestSessionBus, after using the newConn, there is no newConn.Close() to awaken the <-conn.ctx.Done(). So the goroutine will block at the <-conn.ctx.Done(). We can call newConn.Close() to fix the bug probably.
Lines 26 to 32 in 7623695
| newConn, err := SessionBus() | |
| if err != nil { | |
| t.Error(err) | |
| } | |
| if newConn == oldConn { | |
| t.Fatal("Should get a new connection") | |
| } |
you could reproduce the bug using goleak in the func TestSessionBus like this


Metadata
Metadata
Assignees
Labels
No labels