naemon / naemon-livestatus

Naemon - Livestatus Eventbroker Module
GNU General Public License v2.0
26 stars 30 forks source link

fix EADDRINUSE when reloading with tcp socket enabled #92

Closed sni closed 2 years ago

sni commented 2 years ago

without the SO_REUSEADDR / SO_REUSEPORT option lingering TIME_WAIT connections will prevent naemon from loading the module after a reload.

for details see:

to reproduce, start naemon and send a keepalive query to livestatus. Naemon will then stop when trying to reload with 'Unable to bind to...' error.

sni commented 2 years ago

i added the ifdef since i need it for rhel6 anyway :-)