Document async Disconnect behaviour

This was mentioned by @aykevl in https://github.com/tinygo-org/bluetooth/pull/32#issuecomment-698313299
This commit is contained in:
Linus Wallgren 2020-09-24 17:07:29 +02:00 committed by Ron Evans
parent 2fb3b08920
commit c27b1cb3be
2 changed files with 4 additions and 2 deletions

@ -128,7 +128,8 @@ func (a *Adapter) Connect(address Addresser, params ConnectionParams) (*Device,
}
}
// Disconnect from the BLE device.
// Disconnect from the BLE device. This method is non-blocking and does not
// wait until the connection is fully gone.
func (d *Device) Disconnect() error {
d.cm.CancelConnect(d.prph)
return nil

@ -267,7 +267,8 @@ func (a *Adapter) Connect(address Addresser, params ConnectionParams) (*Device,
}, nil
}
// Disconnect from the BLE device.
// Disconnect from the BLE device. This method is non-blocking and does not
// wait until the connection is fully gone.
func (d *Device) Disconnect() error {
return d.device.Disconnect()
}