Skip to content
Bjorn Svensson edited this page Sep 23, 2020 · 5 revisions

Remove need of trap_exit

A client, like eredis_cluster, uses process_flag(trap_exit, true) when starting a eredis client using: eredis:start_link(Address, Port, Options) We should make sure we dont crash and return an error instead (only applicable with no_reconnect)

Reconnect when setopt fails

handle_info({tcp, Socket, Data}, #state{socket = Socket} = State) ->
    ok = inet:setopts(Socket, [{active, once}]),
    {noreply, handle_response(Data, State)};

%% Receive TLS data from socket. Match `Socket' to enforce sanity.
handle_info({ssl, Socket, Data}, #state{socket = Socket} = State) ->
    ok = ssl:setopts(Socket, [{active, once}]),

Update README regarding reconnect_sleep

When using reconnect_sleep=no_reconnect there will be no reconnections https://github.com/Nordix/eredis#connect-a-client-start_link0-3

Clone this wiki locally