Skip to content

Commit 72acb11

Browse files
committed
be more tolerant of laggy networks;
client has a 5sec timeout before it retries the RRQ when initiating a download previously, if client eventually received a response for both of the issued RRQ's, it would panic and disconnect instead, ignore the duplicate ack/oack and keep going
1 parent 8e52f3d commit 72acb11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

partftpy/TftpStates.py

+4
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,10 @@ def handle(self, pkt, raddress, rport):
530530
self.sendError(TftpErrors.IllegalTftpOp)
531531
raise TftpException("Received ERR from peer: " + str(pkt))
532532

533+
elif isinstance(pkt, TftpPacketACK) or isinstance(pkt, TftpPacketOACK):
534+
log.warning("Discarding unexpected packet type (retransmission?): %s", pkt)
535+
return self
536+
533537
else:
534538
self.sendError(TftpErrors.IllegalTftpOp)
535539
raise TftpException("Received unknown packet type from peer: " + str(pkt))

0 commit comments

Comments
 (0)