• Yue Ko's avatar
    Allow graceful restart when using TLS listener (#1389) · 1112145f
    Yue Ko authored
    The original ServergRPC.Listen() method returns a tls.Listener
    when tls protocol is specified. Unfortunate, tls.Listener
    does not implement the caddy.Listener interface that is
    needed for graceful restart to work.
    
    The change is to have the ServergRPC.Listen() method returns the
    inner net.Listener instead. The creation of the tls.Listener
    is deferred to the ServergRPC.Serve() method.
    1112145f
server-grpc.go 4.55 KB