Skip to content

Commit

Permalink
fix: not resending packets when id has wrapped and retransmit is need…
Browse files Browse the repository at this point in the history
…ed for just before the wrap
  • Loading branch information
Julusian committed Dec 7, 2019
1 parent b136ac0 commit 1b32e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/atemSocketChild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class AtemSocketChild extends EventEmitter {
sentPacket.resent++
this._sendPacket(sentPacket.payload)
} else if (sentPacket && sentPacket.lastSent + IN_FLIGHT_TIMEOUT < Date.now()) {
if (sentPacket.resent <= MAX_PACKET_RETRIES && sentPacket.packetId < this._nextSendPacketId) {
if (sentPacket.resent <= MAX_PACKET_RETRIES && this._isPacketCoveredByAck(this._nextSendPacketId, sentPacket.packetId)) {
sentPacket.lastSent = Date.now()
sentPacket.resent++

Expand Down

0 comments on commit 1b32e35

Please sign in to comment.