remove_connection(Ref :: ranch:ref()) -> remove_connection(Ref, self()) remove_connection(Ref :: ranch:ref(), Pid :: pid()) -> ok
ranch:remove_connection - Remove connection from the count
remove_connection(Ref :: ranch:ref()) -> remove_connection(Ref, self()) remove_connection(Ref :: ranch:ref(), Pid :: pid()) -> ok
Remove connection from the count.
This connection will no longer be included in the count when limiting the number of connections. This can be useful in a mixed environment where some connections are active and others are passive. Passive connections spend most of their time idling and are not consuming much resources.
When connection_type is supervisor and the socket belongs to a child of the supervised process, call remove_connection/2 with that parent pid.
This function may only be called from a connection process.
The listener name.
The pid to remove from the count.
The atom ok is always returned. It can be safely ignored.
remove_connection/2 arity was added.
ranch:remove_connection(example).
ranch:remove_connection(example, Parent).
Support my work on Cowboy, Ranch, Gun and Erlang.mk via GitHub Sponsors. The funds cover domain names and development tools.