summaryrefslogtreecommitdiff
path: root/p11p-daemon/src
diff options
context:
space:
mode:
authorLinus Nordberg <linus@sunet.se>2019-07-01 10:35:01 +0200
committerLinus Nordberg <linus@sunet.se>2019-07-01 10:35:58 +0200
commit188a93dbdd726e41de00bdc6d02981de34250587 (patch)
treecf65868faf7424af403e1ef4c4e5c1a120c5aa73 /p11p-daemon/src
parent0a964e65a83f41375619a6093d49720d356b5928 (diff)
when a remote times out, hang up its p11 client
7db7c1d ("remove some FIXME:s") contained more than what the commit message says. Needs this too.
Diffstat (limited to 'p11p-daemon/src')
-rw-r--r--p11p-daemon/src/p11p_remote.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/p11p-daemon/src/p11p_remote.erl b/p11p-daemon/src/p11p_remote.erl
index cb59d20..84299c5 100644
--- a/p11p-daemon/src/p11p_remote.erl
+++ b/p11p-daemon/src/p11p_remote.erl
@@ -76,9 +76,9 @@ handle_info({Port, {data, Data}}, #state{replyto = Pid} = State) when Port == St
{noreply, handle_remote_data(State, p11p_rpc:new(), tl(Data))};
handle_info({Port, {data, Data}}, #state{msg = Msg} = State) when Port == State#state.port ->
{noreply, handle_remote_data(State, Msg, Data)};
-handle_info({timeout, Timer, Port}, #state{token = TokName} = State) when Port == State#state.port, Timer == State#state.timer ->
+handle_info({timeout, Timer, Port}, #state{token = TokName, replyto = Server} = State) when Port == State#state.port, Timer == State#state.timer ->
lager:info("~p: rpc request timed out, exiting", [self()]),
- ok = p11p_remote_manager:server_event(timeout, [TokName]),
+ ok = p11p_remote_manager:server_event(timeout, [TokName, Server]),
NewState = State#state{timer = undefined},
{stop, normal, NewState};
handle_info(Info, State) ->