raiden00pl opened a new pull request, #20552:
URL: https://github.com/apache/nuttx/pull/20552

   
   ## Summary
   
   net/tcp: reuse closing connections also with CONFIG_NET_SOLINGER.
   
   When the connection pool is empty, tcp_alloc() frees the oldest
   closing or TIME_WAIT connection, but only without
   CONFIG_NET_SOLINGER. The guard protected a close() that blocked
   waiting for the close callback. Since 0636c17 ("net/tcp: wave
   hands on background") close() returns at once also with SO_LINGER
   (it only sets the linger timeout), and tcp_free() cancels the pending
   close work and the timer.
   
   With CONFIG_NET_SOLINGER, a node that closes its connections first
   ran out of TCP connections once CONFIG_NET_TCP_PREALLOC_CONNS of them
   were in TIME_WAIT: socket() failed with ENOMEM until TIME_WAIT
   expired.
   
   ## Impact
   
   bug fix
   
   ## Testing
   
   detected by automate tests from https://github.com/railab/nuttx-testlab
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to