diff options
author | Micael Karlberg <[email protected]> | 2011-11-23 16:26:44 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-11-23 16:26:44 +0100 |
commit | 6c82cc7c3ddb545603ea2bcb6bfaf5706e9b71f3 (patch) | |
tree | 32d0ab8ebd9a523394dd96356ccc4c8a6bb82e16 /lib/inets/src/http_server | |
parent | ed6b55aeb44bbbc32563f1fe7c066712b04e8fe9 (diff) | |
parent | 473c6308bbfed958ab04f45f53305e5d82d733fa (diff) | |
download | otp-6c82cc7c3ddb545603ea2bcb6bfaf5706e9b71f3.tar.gz otp-6c82cc7c3ddb545603ea2bcb6bfaf5706e9b71f3.tar.bz2 otp-6c82cc7c3ddb545603ea2bcb6bfaf5706e9b71f3.zip |
Merge branch 'bmk/inets/dialyzer_fixes/OTP-9736' into bmk/inets/inets58_integration2
Diffstat (limited to 'lib/inets/src/http_server')
-rw-r--r-- | lib/inets/src/http_server/httpd_acceptor.erl | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/inets/src/http_server/httpd_acceptor.erl b/lib/inets/src/http_server/httpd_acceptor.erl index 1c954106c1..046e491bbf 100644 --- a/lib/inets/src/http_server/httpd_acceptor.erl +++ b/lib/inets/src/http_server/httpd_acceptor.erl @@ -139,11 +139,11 @@ acceptor_loop(Manager, SocketType, ListenSocket, ConfigDb, AcceptTimeout) -> handle_error(Reason, ConfigDb), ?MODULE:acceptor_loop(Manager, SocketType, ListenSocket, ConfigDb, AcceptTimeout); - {'EXIT', _Reason} = EXIT -> - ?hdri("accept exited", [{reason, _Reason}]), - handle_error(EXIT, ConfigDb), - ?MODULE:acceptor_loop(Manager, SocketType, ListenSocket, - ConfigDb, AcceptTimeout) + {'EXIT', Reason} -> + ?hdri("accept exited", [{reason, Reason}]), + ReasonString = + lists:flatten(io_lib:format("Accept exit: ~p", [Reason])), + accept_failed(ConfigDb, ReasonString) end. @@ -152,9 +152,6 @@ handle_connection(Manager, ConfigDb, AcceptTimeout, SocketType, Socket) -> http_transport:controlling_process(SocketType, Socket, Pid), httpd_request_handler:socket_ownership_transfered(Pid, SocketType, Socket). - --spec handle_error(Error::timeout|emfile|closed|econnreset|econnaborted|esslaccept|{enfile, _}|{'EXIT', Reason::any()}|any(), ConfigDB::any()) -> ok | no_return(). - handle_error(timeout, _) -> ok; @@ -192,16 +189,13 @@ handle_error(esslaccept, _) -> %% not write an error message. ok; -handle_error({'EXIT', Reason}, ConfigDb) -> - String = lists:flatten(io_lib:format("Accept exit: ~p", [Reason])), - accept_failed(ConfigDb, String); - handle_error(Reason, ConfigDb) -> String = lists:flatten(io_lib:format("Accept error: ~p", [Reason])), accept_failed(ConfigDb, String). --spec accept_failed(_, string()) -> no_return(). +-spec accept_failed(ConfigDB :: term(), + ReasonString :: string()) -> no_return(). accept_failed(ConfigDb, String) -> error_logger:error_report(String), |