Skip to content

Commit

Permalink
Fixed requestMTU() updating with the wrong value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco012 committed Oct 24, 2023
1 parent b483665 commit a517a0e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ class BluetoothConnection internal constructor(private val device: BluetoothDevi
}

// Request for MTU change
this.log("Request MTU on device: ${device.address} (${mtu} bytes)")
val success = this.gatt?.requestMtu(mtu) ?: false
this.log("Request MTU on device: ${device.address} (${bytes} bytes)")
val success = this.gatt?.requestMtu(bytes) ?: false
if (success) {
this.log("MTU change request success on: ${device.address} (value: $mtu)")
this.log("MTU change request success on: ${device.address} (value: $bytes)")
} else {
this.error("Could not request MTU change on: ${device.address}")
}
Expand Down

0 comments on commit a517a0e

Please sign in to comment.