Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
Order of options in listen is undocumented but significant. Now user option will
replace default value if user set it.
|
|
|
|
These errors just pollute the logs when garbage is sent to the
socket. Exit the process normally to avoid unwanted logs.
|
|
Allows closing the socket in one or two directions.
|
|
All of it can be found in the manual, which defines what the
code must do, and is always up to date unlike the code comments.
|
|
|
|
|
|
Becoming closer to a standard supervisor everyday.
|
|
Implements the `shutdown` option as documented previously.
|