nimbuscontrols / EIPScanner

Free implementation of EtherNet/IP in C++
https://eipscanner.readthedocs.io/en/latest/
MIT License
224 stars 90 forks source link

Fix TCPSocket constructor exception safety #112

Open tsr-boxbot opened 2 months ago

tsr-boxbot commented 2 months ago

This commit fixes closing a TCPSocket's raw socket if something goes wrong in the constructor. Presently if the socket gets opened but something else goes wrong then the file descriptor(FD) is left dangling and can quickly exhaust the system FD limit