The serve() method called cleanShutdown() after ctx.Done(), and the fx OnStop hook also called cleanShutdown(). Remove the call in serve() so shutdown happens exactly once via the fx lifecycle.
The serve() method called cleanShutdown() after ctx.Done(), and the fx OnStop hook also called cleanShutdown(). Remove the call in serve() so shutdown happens exactly once via the fx lifecycle.