[erlang-questions] Using ssl (via ranch) {active, once} behaving like {active, twice}

Ingela Andin ingela.andin@REDACTED
Tue Sep 9 11:57:33 CEST 2014


Hi!

2014-09-09 10:24 GMT+02:00 Roger Lipscombe <roger@REDACTED>:

> On 9 September 2014 08:54, Ingela Andin <ingela.andin@REDACTED> wrote:
> > If Ranch uses a pool of accept sockets it is possible that you
> > you are seeing an inheritance bug in ssl that is fixed in 17.
>
> We are using a pool of accept sockets; but I would have thought that
> the fact that we've been around the loop and set {active, once} before
> this happens means that we're not getting bitten by this?
>
> Do you have a link to the fix in 17?
>

Fixed by commit: c80735b0c82ec0bbaa2e2bda4f1598210b193556


>
> > I would say that from an OTP view of things, the normal way to handle
> socket
> > messages is with active once.
>
> We are using {active, once}; can you point to an example of an OTP
> application that handles messages across multiple packets? I'm pretty
> sure that I can sort this out by using {active, true} and using
> selective receive, but I'd like to see an example with {active, once}.
>


The ssl application uses active once internally (the active once on an
sslsocket is emulated), so does the ssh application and inets
HTTP-server to name a few.



>
> > From a supervisor and code upgrading perspective you do usually not want
> > black a process in a recv call.
>
> Surely that's {active, true}, or am I missing something?
>

Active once (or nowdays even active N) can be used to get some flow control
as opposed to active mode.

Regards Ingela Erlang/OTP Team - Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140909/86d2b362/attachment.htm>


More information about the erlang-questions mailing list