replace grpc port code that i removed for some reason

This commit is contained in:
Travis 2020-07-10 10:57:20 -05:00
parent bb9b3d4e6f
commit 85bd306eb5
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E

View file

@ -265,6 +265,11 @@ func (m *Command) SetupServer() error {
return errors.Wrap(err, "creating grpc listener")
}
// If grpc port is 0, get auto-allocated port from listener
if grpcURI.Port == 0 {
grpcURI.SetPort(uint16(m.grpcLn.Addr().(*net.TCPAddr).Port))
}
// Setup TLS
if uri.Scheme == "https" {
m.tlsConfig, err = GetTLSConfig(&m.Config.TLS, m.logger.Logger())