diff options
author | Ingela Anderton Andin <[email protected]> | 2017-10-25 11:03:31 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-10-25 11:03:31 +0200 |
commit | 48006b39ea9870845f5804d0250618cfcc027b34 (patch) | |
tree | a362a2ddc771d8af2096f573b12674738508ebc7 /lib/inets/src/http_server/httpd.erl | |
parent | 40e787f289a240e6a6b12e03b9501dc492c89aa9 (diff) | |
parent | b232eb7b2367019164c5ce29a82dae03d455b986 (diff) | |
download | otp-48006b39ea9870845f5804d0250618cfcc027b34.tar.gz otp-48006b39ea9870845f5804d0250618cfcc027b34.tar.bz2 otp-48006b39ea9870845f5804d0250618cfcc027b34.zip |
Merge branch 'maint'
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} -> |