|
9 | 9 | %%%
|
10 | 10 | %%% MIT License
|
11 | 11 | %%%
|
12 |
| -%%% Copyright (c) 2012-2021 Michael Truog <mjtruog at protonmail dot com> |
| 12 | +%%% Copyright (c) 2012-2025 Michael Truog <mjtruog at protonmail dot com> |
13 | 13 | %%%
|
14 | 14 | %%% Permission is hereby granted, free of charge, to any person obtaining a
|
15 | 15 | %%% copy of this software and associated documentation files (the "Software"),
|
|
30 | 30 | %%% DEALINGS IN THE SOFTWARE.
|
31 | 31 | %%%
|
32 | 32 | %%% @author Michael Truog <mjtruog at protonmail dot com>
|
33 |
| -%%% @copyright 2012-2021 Michael Truog |
34 |
| -%%% @version 2.0.2 {@date} {@time} |
| 33 | +%%% @copyright 2012-2025 Michael Truog |
| 34 | +%%% @version 2.0.8 {@date} {@time} |
35 | 35 | %%%------------------------------------------------------------------------
|
36 | 36 |
|
37 | 37 | -module(cloudi_service_http_cowboy1).
|
|
203 | 203 | -endif.
|
204 | 204 | -endif.
|
205 | 205 |
|
| 206 | +% avoid misuse of old catch with a macro |
| 207 | +-define(CATCH(E), |
| 208 | + try E, ok catch _:_ -> ok end). |
| 209 | + |
206 | 210 | %%%------------------------------------------------------------------------
|
207 | 211 | %%% External interface functions
|
208 | 212 | %%%------------------------------------------------------------------------
|
@@ -602,7 +606,7 @@ cloudi_service_terminate(_Reason, _Timeout, undefined) ->
|
602 | 606 | ok;
|
603 | 607 | cloudi_service_terminate(_Reason, _Timeout,
|
604 | 608 | #state{service = Service}) ->
|
605 |
| - _ = (catch cowboy:stop_listener(Service)), |
| 609 | + ok = ?CATCH(cowboy:stop_listener(Service)), |
606 | 610 | ok.
|
607 | 611 |
|
608 | 612 | %%%------------------------------------------------------------------------
|
|
0 commit comments