Skip to content

Conversation

rkjdid
Copy link

@rkjdid rkjdid commented Aug 2, 2019

fix #48

@estutzenberger
Copy link

Thanks for the PR! I have only recently taken over management of this library so some of the code is still new to me. I think this generally looks fine. For #49, I think the better fix is to only re-enable advertising upon disconnection. A completed connection should not re-enable advertising since only one central connection is allowed. Note that the spec allows for multiple central connections but as far as I have seen, this is not well supported or often used.

linux/hci/hci.go Outdated
@@ -505,6 +509,10 @@ func (h *HCI) handleLEConnectionComplete(b []byte) error {
}
h.params.RUnlock()
}
log.Println("incoming:", c.RemoteAddr())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this log message. I think the library generally needs a logging pass.

@estutzenberger
Copy link

Looks good, thanks!

@estutzenberger estutzenberger merged commit 0105c68 into go-ble:master Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

server: handle disconnect/connect events on HCI device
2 participants