Skip to content

Commit 63d96ba

Browse files
committed
fix: correctly handle slice of connection handles for notification updates
Signed-off-by: deadprogram <[email protected]>
1 parent c6c2d9d commit 63d96ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

att_hci.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,12 @@ func (a *att) sendNotification(handle uint16, data []byte) error {
478478
b[0] = attOpHandleNotify
479479
binary.LittleEndian.PutUint16(b[1:], handle)
480480

481-
for connection := range a.connections {
481+
for _, connection := range a.connections {
482482
if debug {
483483
println("att.sendNotifications: sending to", connection)
484484
}
485485

486-
if err := a.hci.sendAclPkt(uint16(connection), attCID, append(b[:], data...)); err != nil {
486+
if err := a.hci.sendAclPkt(connection, attCID, append(b[:], data...)); err != nil {
487487
return err
488488
}
489489
}

0 commit comments

Comments
 (0)