diff options
-rw-r--r-- | ecp/src/rbuf_recv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ecp/src/rbuf_recv.c b/ecp/src/rbuf_recv.c index 98b472c..a3f2345 100644 --- a/ecp/src/rbuf_recv.c +++ b/ecp/src/rbuf_recv.c @@ -308,7 +308,10 @@ ssize_t ecp_rbuf_store(ECPConnection *conn, ecp_seq_t seq, unsigned char *msg, s if (rv < 0) return rv; buf->ack_map |= ack_bit; - do_ack = ack_shift(buf); + /* reliable transport can prevent seq_ack from reaching seq_max */ + if (ECP_SEQ_LT(buf->seq_ack, rbuf->seq_max)) { + do_ack = ack_shift(buf); + } } else { return ECP_ERR_RBUF_DUP; } |