diff options
Diffstat (limited to 'p11p-daemon/src/p11p_manager.erl')
-rw-r--r-- | p11p-daemon/src/p11p_manager.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p11p-daemon/src/p11p_manager.erl b/p11p-daemon/src/p11p_manager.erl index 209d08e..6f9e977 100644 --- a/p11p-daemon/src/p11p_manager.erl +++ b/p11p-daemon/src/p11p_manager.erl @@ -85,6 +85,8 @@ handle_call({client_for_token, Server, TokNameIn}, _From, lager:debug("all clients: ~p", [ClientsIn]), {Clients, BalanceCount} = case VTokenIn#vtoken.balance_count of + -1 -> + {ClientsIn, -1}; 0 -> lager:debug("~p: balancing: next client", [self()]), Rotated = rotate_clients(ClientsIn), @@ -92,9 +94,7 @@ handle_call({client_for_token, Server, TokNameIn}, _From, {Rotated, First#client.balance - 1}; N when N > 0 -> lager:debug("~p: balancing: ~B more invocations", [self(), N]), - {ClientsIn, N - 1}; - -1 -> - {ClientsIn, -1} + {ClientsIn, N - 1} end, Current = hd(Clients), case Current#client.pid of |