Skip to content

Commit

Permalink
fix: no need for drain (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kybarg authored Jul 2, 2024
1 parent 03f7628 commit 381c6fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ class SSP extends EventEmitter {

try {
// Send command to device
let skipDrain = this.port.write(txBuffer)
if (!skipDrain) this.port.drain()

this.port.write(txBuffer)
this.commandSendAttempts += 1

// Await data from device
Expand Down

0 comments on commit 381c6fb

Please sign in to comment.