PostStart hooks run after server goroutines are launched but before runGRPC/runHTTP have actually bound their listeners (both call net.Listen + Serve inside the goroutine).
To fix: separate listener creation from serving — create net.Listener first, then pass to Serve() in the goroutine. Add a readiness signal (channel or WaitGroup) so PostStart runs only after both servers report they're listening.
Raised from #85 review.
PostStart hooks run after server goroutines are launched but before
runGRPC/runHTTPhave actually bound their listeners (both callnet.Listen+Serveinside the goroutine).To fix: separate listener creation from serving — create
net.Listenerfirst, then pass toServe()in the goroutine. Add a readiness signal (channel or WaitGroup) so PostStart runs only after both servers report they're listening.Raised from #85 review.