fix config
This commit is contained in:
parent
8f801fd29c
commit
2c1af8a208
@ -73,8 +73,7 @@ open_target_socket(Params) when is_map(Params) ->
|
||||
end.
|
||||
|
||||
-spec stream_target_options(map()) -> error | {ok, #options{}}.
|
||||
stream_target_options(Params = #{<<"target">> := Target0}) ->
|
||||
Target = binary_to_atom(Target0),
|
||||
stream_target_options(Params = #{<<"target">> := Target}) when is_binary(Target) ->
|
||||
{ok, StreamTargets} = application:get_env(efka, stream_targets),
|
||||
case proplists:get_value(Target, StreamTargets, undefined) of
|
||||
undefined ->
|
||||
@ -90,7 +89,9 @@ stream_target_options(Params = #{<<"target">> := Target0}) ->
|
||||
connect_timeout = maps:get(<<"connect_timeout">>, Params, ConnectTimeout0),
|
||||
idle_timeout = maps:get(<<"idle_timeout">>, Params, IdleTimeout0)
|
||||
}}
|
||||
end.
|
||||
end;
|
||||
stream_target_options(_Params) ->
|
||||
error.
|
||||
|
||||
-spec loop(stream_id(), gen_tcp:socket(), timeout()) -> ok.
|
||||
loop(StreamId, Socket, IdleTimeout) ->
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
]},
|
||||
|
||||
{stream_targets, [
|
||||
{manager, [
|
||||
{<<"manager">>, [
|
||||
{host, "127.0.0.1"},
|
||||
{port, 18091},
|
||||
{connect_timeout, 3000},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user