MD TCP socket at listener side, timeout to close inactive socket ?
Hi. We also faced this issue, here is a patch proposal. Best regards, -Kari-
Could we change the code like below, trdp_pdcom.c 896 if ((newSeqCnt > 0u) && (newSeqCnt > (pExistingElement->curSeqCnt + 1u))) -> if ((newSeqCnt > 0u) && (newSeqCnt > (pExistingElement->curSeqCnt + 1u)) && (pExistingElement->numRxTx > 0)) And increase missed frames counter only if subscriber has received some frame.
Could we just remove following code lines (900-903) from trdp_pdcom.c ? 900 else if (pExistingElement->curSeqCnt > newSeqCnt) 901 { 902 pExistingElement->numMissed += UINT32_MAX - pExistingElement->curSeqCnt + newSeqCnt; 903 } And expect that receiving sequence counter value less than previous one means that publisher has restarted.
PD subscriber statistics when publisher start earlier
Statistics of missed PD packets when publisher restarts
Just tested current trunk, looks good. This ticket can be closed.
Just tested trunk-code, I'm afraid the fix doesn't work, some notifications are still dropped. trdp_mdcom.c: trdp_mdHandleRequest() ... /* Only if no Notification */ if (state != TRDP_ST_TX_NOTIFY_ARM) /* In my application, state is TRDP_ST_RX_NOTIFY_RECEIVED which cause "trdp_mdRecv: Repeated request discarded!" TRDP_ST_TX_NOTIFY_ARM -> TRDP_ST_RX_NOTIFY_RECEIVED ? */