diff options
author | Ingela Anderton Andin <[email protected]> | 2014-05-06 17:30:38 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-05-06 17:30:38 +0200 |
commit | b38c2c8f67772f8260bfaa99ea110212b3a3df57 (patch) | |
tree | aa104c80ea78aec29c029080d9d906629fb2e0be /lib/inets/src/http_server/httpd.erl | |
parent | aca0b6182b039333b4c963938878d9eecc85e5a1 (diff) | |
download | otp-b38c2c8f67772f8260bfaa99ea110212b3a3df57.tar.gz otp-b38c2c8f67772f8260bfaa99ea110212b3a3df57.tar.bz2 otp-b38c2c8f67772f8260bfaa99ea110212b3a3df57.zip |
inets: Correct distirbing mode for httpd:reload_config/2
config_reload tests are not enough to test httpd "block/unblock"
used by config_reload, so renable some test cases in the old_httpd_SUITE
after making them work with the new code. Should be cleaned up and moved
to httpd_SUITE.
Diffstat (limited to 'lib/inets/src/http_server/httpd.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/inets/src/http_server/httpd.erl b/lib/inets/src/http_server/httpd.erl index 6052ae9022..e8148ea362 100644 --- a/lib/inets/src/http_server/httpd.erl +++ b/lib/inets/src/http_server/httpd.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2014. 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 @@ -294,9 +294,13 @@ do_reload_config(ConfigList, Mode) -> {ok, Config} -> Address = proplists:get_value(bind_address, Config, any), Port = proplists:get_value(port, Config, 80), - block(Address, Port, Mode), - reload(Config, Address, Port), - unblock(Address, Port); + case block(Address, Port, Mode) of + ok -> + reload(Config, Address, Port), + unblock(Address, Port); + Error -> + Error + end; Error -> Error end. |