benjojo / alertmanager-discord

Take your alertmanager alerts, into discord
Apache License 2.0
177 stars 78 forks source link

If the port cannot be bound, the program should fail #23

Closed Baughn closed 3 years ago

Baughn commented 3 years ago

At the moment, if discord-alertmanager is asked to listen on a port that is already in use, it will exit with status code 0. This means it will not be marked as 'failed' by systemd.

Since it's never meant to exit, you should simply add os.Exit(1) to the end of main.

benjojo commented 3 years ago

Cheers, good spot