Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-11-05 23:53:45 +03:00
parent a4e79970be
commit fc9a87d827

View File

@ -38,7 +38,7 @@ func (t *grpcTransportListener) Accept(fn func(transport.Socket)) error {
// setup tls if specified
if t.secure && t.tls == nil {
return fmt.Errorf("request secure communication but *tls.Config is nil")
} else if t.secure {
} else if t.secure && t.tls != nil {
creds := credentials.NewTLS(t.tls)
opts = append(opts, grpc.Creds(creds))
}