Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exit status code #637

Merged
merged 1 commit into from
Apr 12, 2019
Merged

fix exit status code #637

merged 1 commit into from
Apr 12, 2019

Conversation

ianic
Copy link
Contributor

@ianic ianic commented Apr 12, 2019

Fabio always returned status code 1. Even on clean exit.
Shutdown of http server is treated as fatal:

[FATAL] http: Server closed
[FATAL] ui: http: Server closed

HTTP server Serve method always returns non nil error.

ErrServerClosed should be treated as clean exit.

After Shutdown or Close, the returned error is ErrServerClosed."

Fabio always returned status code 1. Event on clean exit.
Shutdown of http server is treated as fatal:
 [FATAL] http: Server closed
 [FATAL] ui: http: Server closed

Http server Serve method always returns non nil error:
https://golang.org/pkg/net/http/#Server.Serve

ErrServerClosed should be treated as clean exit.
"After Shutdown or Close, the returned error is ErrServerClosed."
@CLAassistant
Copy link

CLAassistant commented Apr 12, 2019

CLA assistant check
All committers have signed the CLA.

@pschultz
Copy link
Member

pschultz commented Apr 12, 2019

Looks good to me, but this should be clearly communicated in the changelog.

It's conceivable that some people run fabio under a supervisor that only restarts on non-zero exit (I believe systemd can be made to behave like that), and this change may cause fabio to not be always restarted anymore.

@aaronhurt
Copy link
Member

agreed, good catch

@aaronhurt aaronhurt merged commit 3d02439 into fabiolb:master Apr 12, 2019
@magiconair magiconair added this to the 1.5.12 milestone Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants