Indention
This commit is contained in:
parent
b905cce833
commit
9ab363adfe
1 changed files with 9 additions and 8 deletions
|
@ -81,14 +81,15 @@ init([]) ->
|
||||||
{ok, #state{}}.
|
{ok, #state{}}.
|
||||||
|
|
||||||
handle_call({open, Dir, Config, Caller}, _From, #state{conn=undefined}=State) ->
|
handle_call({open, Dir, Config, Caller}, _From, #state{conn=undefined}=State) ->
|
||||||
{Reply, NState} = case wterl:conn_open(Dir, wterl:config_to_bin(Config)) of
|
{Reply, NState} =
|
||||||
{ok, ConnRef}=OK ->
|
case wterl:conn_open(Dir, wterl:config_to_bin(Config)) of
|
||||||
Monitor = erlang:monitor(process, Caller),
|
{ok, ConnRef}=OK ->
|
||||||
true = ets:insert(wterl_ets, {Monitor, Caller}),
|
Monitor = erlang:monitor(process, Caller),
|
||||||
{OK, State#state{conn = ConnRef}};
|
true = ets:insert(wterl_ets, {Monitor, Caller}),
|
||||||
Error ->
|
{OK, State#state{conn = ConnRef}};
|
||||||
{Error, State}
|
Error ->
|
||||||
end,
|
{Error, State}
|
||||||
|
end,
|
||||||
{reply, Reply, NState};
|
{reply, Reply, NState};
|
||||||
handle_call({open, _Dir, _Config, Caller}, _From,#state{conn=ConnRef}=State) ->
|
handle_call({open, _Dir, _Config, Caller}, _From,#state{conn=ConnRef}=State) ->
|
||||||
Monitor = erlang:monitor(process, Caller),
|
Monitor = erlang:monitor(process, Caller),
|
||||||
|
|
Loading…
Reference in a new issue