tempesta-tech / tempesta

All-in-one solution for high performance web content delivery and advanced protection against DDoS and web attacks
https://tempesta-tech.com/
GNU General Public License v2.0
623 stars 103 forks source link

Fix releasing not dead sock #2239

Closed EvgeniiMekhanik closed 1 month ago

EvgeniiMekhanik commented 2 months ago

When ss_connect fails we put socket refcounter and release sock (when it becames equal to zero), but socket was not closed. That leads to error message in dmesg and some socket resources could be not freed. This patch fix this behaviour, now we close socket before free it.