examples icon indicating copy to clipboard operation
examples copied to clipboard

Graceful shutdown example outdated

Open AkselMeola opened this issue 3 years ago • 0 comments

(Not sure if this is examples problem or gins problem. )

Hey,

The graceful shutdown example provided in examples/graceful-shutdown does not use gin.Run() and instead calls the http.ListenAndServe() directly.

It looks like gin.Run() also does additional configurations on the engine before starting the server. These methods are private and implementing similar logic without copy/paste is not possible.

Problem: gin.Run() does not expose the server instance anywhere to be able to call Shutdown() on it.

Any ideas ?

AkselMeola avatar May 12 '21 16:05 AkselMeola