File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ defmodule GRPC.Client.Adapters.Gun do
77
88 @ behaviour GRPC.Client.Adapter
99
10- @ default_transport_opts [ nodelay: true ]
10+ @ default_tcp_opts [ nodelay: true ]
1111 @ max_retries 100
1212
1313 @ impl true
@@ -24,12 +24,17 @@ defmodule GRPC.Client.Adapters.Gun do
2424 defp connect_securely ( % { cred: % { ssl: ssl } } = channel , opts ) do
2525 transport_opts = Map . get ( opts , :transport_opts ) || [ ]
2626
27- tls_opts = Keyword . merge ( @ default_transport_opts ++ ssl , transport_opts )
27+ tls_opts = Keyword . merge ( ssl , transport_opts )
2828
2929 open_opts =
3030 opts
3131 |> Map . delete ( :transport_opts )
32- |> Map . merge ( % { transport: :ssl , protocols: [ :http2 ] , tls_opts: tls_opts } )
32+ |> Map . merge ( % {
33+ transport: :ssl ,
34+ protocols: [ :http2 ] ,
35+ tcp_opts: @ default_tcp_opts ,
36+ tls_opts: tls_opts
37+ } )
3338
3439 do_connect ( channel , open_opts )
3540 end
@@ -45,7 +50,7 @@ defmodule GRPC.Client.Adapters.Gun do
4550
4651 transport_opts = Map . get ( opts , :transport_opts ) || [ ]
4752
48- tcp_opts = Keyword . merge ( @ default_transport_opts , transport_opts )
53+ tcp_opts = Keyword . merge ( @ default_tcp_opts , transport_opts )
4954
5055 open_opts =
5156 opts
You can’t perform that action at this time.
0 commit comments