diff options
author | Linus Nordberg <linus@sunet.se> | 2019-07-01 14:56:59 +0200 |
---|---|---|
committer | Linus Nordberg <linus@sunet.se> | 2019-07-01 14:56:59 +0200 |
commit | 84878c12755a181ef28039e7dc37c1e1bb294bee (patch) | |
tree | 2b8d73a510b304b04a443bb0c4957191ad965bda /p11p-daemon | |
parent | 1436c870dc5dd4b09e8b0fcf50df36dc32f8b10c (diff) |
add outcommented code for testing remote timeouts
Diffstat (limited to 'p11p-daemon')
-rw-r--r-- | p11p-daemon/src/p11p_remote.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/p11p-daemon/src/p11p_remote.erl b/p11p-daemon/src/p11p_remote.erl index 9047cad..158b427 100644 --- a/p11p-daemon/src/p11p_remote.erl +++ b/p11p-daemon/src/p11p_remote.erl @@ -112,7 +112,16 @@ do_add_to_outbuf(Data, #state{outbuf = Buf} = State) -> do_send(#state{port = Port, outbuf = Buf} = State) -> %%lager:debug("~p: sending ~B octets to remote", [self(), size(Buf)]), + + %% case rand:uniform(15) of + %% 1 -> + %% lager:debug("~p: faking unresponsive remote (~p) by not sending it any.", [self(), Port]); + %% _ -> + %% port_command(Port, Buf) + %% end, + port_command(Port, Buf), + State#state{outbuf = <<>>}. handle_remote_data(#state{replyto = Pid, timer = Timer} = State, Msg, Data) -> |