diff options
-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) -> |