By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem
ListenAndServe() method blocks the main goroutine, but when gracefulShutdown(server) is called in a separate goroutine, the Shutdown() function is triggered when an interrupt signal is received.
if the server.ListenAndServe() call does not return http.ErrServerClosed, it indicates that the server did not shut down properly, causing the main goroutine to keep running and preventing a clean exit
Checklist
[x] I have self-reviewed the changes being requested
[x] I have updated the documentation (check issue ticket #218)
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem
ListenAndServe() method blocks the main goroutine, but when gracefulShutdown(server) is called in a separate goroutine, the Shutdown() function is triggered when an interrupt signal is received.
if the server.ListenAndServe() call does not return http.ErrServerClosed, it indicates that the server did not shut down properly, causing the main goroutine to keep running and preventing a clean exit
Checklist