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
615 stars 103 forks source link

Fix releasing not dead sock #2239

Open EvgeniiMekhanik opened 2 weeks ago

EvgeniiMekhanik commented 2 weeks 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.