Skip to content

Commit

Permalink
fix: close signal on Connect for Linux platform to address issues rai…
Browse files Browse the repository at this point in the history
…sed in #262

Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Jan 10, 2025
1 parent 43edf72 commit 48b1dfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gap_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
// were connected between the two calls the signal wouldn't be picked up.
signal := make(chan *dbus.Signal)
a.bus.Signal(signal)
defer close(signal)
defer a.bus.RemoveSignal(signal)
propertiesChangedMatchOptions := []dbus.MatchOption{dbus.WithMatchInterface("org.freedesktop.DBus.Properties")}
a.bus.AddMatchSignal(propertiesChangedMatchOptions...)
Expand Down

0 comments on commit 48b1dfe

Please sign in to comment.