mraja-brooks commented on issue #11292: URL: https://github.com/apache/nuttx/issues/11292#issuecomment-1832935319
tcpsend_eventhandler is the callback on state that actually sends the data to dev: ``` /* Then set-up to send that amount of data. (**this won't actually * happen until the polling cycle completes**). */ devif_send(dev, &pstate->snd_buffer[pstate->snd_sent], sndlen); ``` Once state.send_cb->event call back is set to above, next thing is to notify the device driver and then wait for semaphore state.snd_sem. ``` /* Notify the device driver of the availability of TX data */ send_txnotify(psock, conn); ``` These are all disconnected (or so they seem) and some how changing s_sndtimeo to anything other than UINT_MAX below "fixes" the problem. ``` ret = net_timedwait(&state.snd_sem, _SO_TIMEOUT(psock->s_sndtimeo)); if (ret != -ETIMEDOUT || acked == state.snd_acked) { break; /* Timeout without any progress */ } ``` Seems like tcpsend_eventhandler gets called with TCP_NEWDATA flag set sooner or polling cycle completes sooner if the send timeout is not UINT_MAX. But UINT_MAX only impacts wait on semaphore and we never see a timeout error also (even at 100ms timeout). So semaphore does get set! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org