1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

Fix Micro Proxy nil Transport Bug (#1208)

This commit is contained in:
ben-toogood
2020-02-17 09:28:48 +00:00
committed by GitHub
parent 1e40c86dfe
commit aa9a0a8d23

View File

@ -214,6 +214,13 @@ func TLSConfig(t *tls.Config) Option {
return func(o *Options) { return func(o *Options) {
// set the internal tls // set the internal tls
o.TLSConfig = t o.TLSConfig = t
// set the default transport if one is not
// already set. Required for Init call below.
if o.Transport == nil {
o.Transport = transport.DefaultTransport
}
// set the transport tls // set the transport tls
o.Transport.Init( o.Transport.Init(
transport.Secure(true), transport.Secure(true),