diff options
author | Erlang/OTP <[email protected]> | 2010-03-10 13:06:38 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-03-10 13:06:38 +0000 |
commit | 356c33b6063de632f9c98c66260603e6edbc3ee5 (patch) | |
tree | 09faa974e8777f3ae1cb1f5c118aed96426c1f23 /lib/sasl/src/overload.erl | |
parent | a251ad7488c6a1268c4aca0f1937cc397f663325 (diff) | |
parent | a75a033b3af69860f06acc63d2c26200db48ce58 (diff) | |
download | otp-356c33b6063de632f9c98c66260603e6edbc3ee5.tar.gz otp-356c33b6063de632f9c98c66260603e6edbc3ee5.tar.bz2 otp-356c33b6063de632f9c98c66260603e6edbc3ee5.zip |
Merge branch 'bg/sasl-infinity' into dev
* bg/sasl-infinity:
Prepare patch release
sasl: Use gen_server:call/3 with infinity timeout
OTP-8506 bg/sasl-infinity
Use an infinity timeout in all calls to gen_server:call() in the sasl
application.
Diffstat (limited to 'lib/sasl/src/overload.erl')
-rw-r--r-- | lib/sasl/src/overload.erl | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl index 3a9a51e8bf..5a4782efff 100644 --- a/lib/sasl/src/overload.erl +++ b/lib/sasl/src/overload.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% -module(overload). @@ -71,7 +71,7 @@ init([]) -> %% establish a call. %% Returns: accept | reject %%----------------------------------------------------------------- -request() -> gen_server:call(overload, request). +request() -> call(request). %%----------------------------------------------------------------- %% Func: set_config_data/2 @@ -82,13 +82,19 @@ request() -> gen_server:call(overload, request). %% documented at all. %%----------------------------------------------------------------- set_config_data(MaxIntensity, Weight) -> - gen_server:call(overload, {set_config_data, MaxIntensity, Weight}). + call({set_config_data, MaxIntensity, Weight}). %%----------------------------------------------------------------- %% Func: get_overload_info/0 %% Returns: A list of tagged items: TotalIntensity, AcceptIntensity, %% MaxIntensity, Weight, TotalRequests, AcceptedRequests. %%----------------------------------------------------------------- -get_overload_info() -> gen_server:call(overload, get_overload_info). +get_overload_info() -> call(get_overload_info). + +%%----------------------------------------------------------------- +%% call(Request) -> Term +%%----------------------------------------------------------------- +call(Req) -> + gen_server:call(overload, Req, infinity). %%%----------------------------------------------------------------- %%% Callback functions from gen_server |