diff options
Diffstat (limited to 'src/ranch.erl')
-rw-r--r-- | src/ranch.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ranch.erl b/src/ranch.erl index a400798..7a03ef2 100644 --- a/src/ranch.erl +++ b/src/ranch.erl @@ -155,10 +155,13 @@ start_error(_, Error) -> Error. -spec stop_listener(ref()) -> ok | {error, not_found}. stop_listener(Ref) -> + [_, Transport, _, _, _] = ranch_server:get_listener_start_args(Ref), + TransOpts = get_transport_options(Ref), case supervisor:terminate_child(ranch_sup, {ranch_listener_sup, Ref}) of ok -> _ = supervisor:delete_child(ranch_sup, {ranch_listener_sup, Ref}), - ranch_server:cleanup_listener_opts(Ref); + ranch_server:cleanup_listener_opts(Ref), + Transport:cleanup(TransOpts); {error, Reason} -> {error, Reason} end. |