Age | Commit message (Collapse) | Author |
|
|
|
|
|
This allows graceful draining of connections, updating transport
options on a running listener without having to drop connections
and other similar scenarios.
Note that when updating transport options the listener must be
suspended which means that new connections will be rejected until
the listener is resumed.
|
|
|
|
|
|
|
|
|
|
|
|
The NumAcceptors argument has been moved to transport option
num_acceptor, which defaults to 10. The functions now take
one less argument. The old functions are still here, though
deprecated.
|
|
Amended with small whitespace changes and removing an unused clause.
|
|
Provides detailed information about Ranch listeners
|
|
Ranch now depends on SSL. Users embedding listeners in
their supervision tree are expected to depend on SSL too
if they are using it.
|
|
|
|
We always get the acceptor to resume. The child process will
be killed, and the current code will ignore any EXIT message
when that happens because the pid isn't in the process dictionary.
|
|
|
|
Simplify some return values, improve error messages for
eaddrinuse and no_cert.
Amended to add tests and simpler code. Also hides the
contents of cert and key transport options, if any.
|
|
|
|
Cert/certfile is no longer required if SNI options are provided.
|
|
Dialyzer will still complain about unknown options, but at
least users won't be stuck waiting for an upstream update.
|
|
|
|
In some cases the ranch_server:get_connections_sup/1 call could
still succeed depending on timing.
|
|
|
|
Added in ssl-7.3.1 (OTP-13261). Documented in ssl-8.0.
|
|
|
|
|
|
|
|
|
|
This reduces from 10 restarts in 10 seconds to 1 restart
in 5 seconds. This is the new default in OTP 18, and it
fits the kinds of processes that Ranch deals with:
* Supervisors: default makes sense.
* Acceptors: they crash on socket error. They'll probably
crash again if the socket didn't change.
* Connection processes: they are never restarted.
|
|
When SSL is stopped before Ranch, the acceptors crash and
Ranch tries to restart them. The problem is that the
ranch_ssl:listen/1 call was trying to start the SSL
application to make sure it works (an old artifact from
when releases were not ubiquitous). Because the application
controller is trying to shutdown Ranch, and Ranch tries to
tell it to start an application, everything would get stuck.
To avoid a breaking change, we move this in the start_listener
call (or child_spec). Note that there are still logs when the
SSL application is closed, because the acceptors crash. But
at least we don't block node shutdown anymore.
In Ranch 2.0, we will implement the proper fix which is to
simply depend on the SSL application normally. Nowadays, it's
not too difficult to build a release that excludes applications
we don't want, although we should document that in the Ranch
user guide.
|
|
|
|
|
|
Should be more user friendly.
|
|
|
|
|
|
|
|
|
|
|
|
For example 'binary' was making things crash.
|
|
|
|
We are now up to date with regard to transport options we should
accept for the listening socket. Documentation of existing options
has been updated with regard to recent changes in the OTP docs
and type specifications.
|
|
Should fix Dialyzer issues. The options are now also
documented in the Ranch module, and there's new ranch:opt(),
ranch_tcp:opt() and ranch_ssl:opt() for use in third party
code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SSL socket might be closed on accept_ack, it happens quite often
and it is not a problem, so don't report error on the case.
|
|
Currently Ranch checks if a connection is secure by checking if its name
is 'ssl'. This isn't a very modular solution, adding an API function
that returns whether a connection is secure.
|