Skip to content

Commit 5d3554d

Browse files
committed
fix: close signal on Connect for Linux platform to address issues raised in #262
Signed-off-by: deadprogram <[email protected]>
1 parent 43edf72 commit 5d3554d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gap_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
348348
// were connected between the two calls the signal wouldn't be picked up.
349349
signal := make(chan *dbus.Signal)
350350
a.bus.Signal(signal)
351+
defer close(signal)
351352
defer a.bus.RemoveSignal(signal)
352353
propertiesChangedMatchOptions := []dbus.MatchOption{dbus.WithMatchInterface("org.freedesktop.DBus.Properties")}
353354
a.bus.AddMatchSignal(propertiesChangedMatchOptions...)

0 commit comments

Comments
 (0)