diff options
author | Erlang/OTP <[email protected]> | 2017-11-02 08:22:34 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-11-02 08:22:34 +0100 |
commit | d8f7b40f0d8ea8ede5bf1538a1bdc4928e9989f1 (patch) | |
tree | 7e9b456cba610151fcffe934023094dfe28dec9a /lib/inets/src/http_server/httpd.erl | |
parent | a98379d0519c28f9bc9b673ed2c09fb1ad52456e (diff) | |
parent | 25112441ccfb14040a977042d6333e42df7d234f (diff) | |
download | otp-d8f7b40f0d8ea8ede5bf1538a1bdc4928e9989f1.tar.gz otp-d8f7b40f0d8ea8ede5bf1538a1bdc4928e9989f1.tar.bz2 otp-d8f7b40f0d8ea8ede5bf1538a1bdc4928e9989f1.zip |
Merge branch 'ingela/inets/maint/httpd-location-chunk-and-close/OTP-14716/OTP-14656/OTP-14696' into maint-20
* ingela/inets/maint/httpd-location-chunk-and-close/OTP-14716/OTP-14656/OTP-14696:
inets: Prepare for release
inets: httpd - Fix broken handling of POST requests
inets: Make sure httpd:stop_service is synchronous
inets: httpd - do not hardcode 302 status for location
Diffstat (limited to 'lib/inets/src/http_server/httpd.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/inets/src/http_server/httpd.erl b/lib/inets/src/http_server/httpd.erl index 0b632d24e3..540e68e749 100644 --- a/lib/inets/src/http_server/httpd.erl +++ b/lib/inets/src/http_server/httpd.erl @@ -99,7 +99,14 @@ start_service(Conf) -> stop_service({Address, Port}) -> stop_service({Address, Port, ?DEFAULT_PROFILE}); stop_service({Address, Port, Profile}) -> - httpd_sup:stop_child(Address, Port, Profile); + Name = httpd_util:make_name("httpd_instance_sup", Address, Port, Profile), + Pid = whereis(Name), + MonitorRef = erlang:monitor(process, Pid), + Result = httpd_sup:stop_child(Address, Port, Profile), + receive + {'DOWN', MonitorRef, _, _, _} -> + Result + end; stop_service(Pid) when is_pid(Pid) -> case service_info(Pid) of {ok, Info} -> |