[erlang-questions] Re: ssl and {active, once} - bug?

Tony Rogvall tony@REDACTED
Sun Apr 11 23:30:07 CEST 2010


Looks like the ssl_broker is not ready for an http message ?
I am not sure why this message end up there. May be a raise condition.
Probably the active mode is set in the new controlling process before the before 
actual hand over is done. Try sync. Send a message to the new process after the
call to controlling process, wait for that message before setting {active,once}.

I normally write the code in a way that the accept is done in the spawned (child) process, 
and then sync back to the listener process. This way there is no need for contolling_process call.

/Tony




On 11 apr 2010, at 21.36, Roberto Ostinelli wrote:

> 2010/4/11 Tony Rogvall <tony@REDACTED>:
>> What is the value of Sock ?
>>  io:format
> 
> hi tony!
> 
> socket is {sslsocket,6,<0.52.0>}, controlling_process is <0.53.0>. error is:
> 
> =ERROR REPORT==== 11-Apr-2010::21:33:39 ===
> ** Generic server <0.52.0> terminating
> ** Last message in was {http,#Port<0.688>,
>                           {http_request,'GET',
>                               {abs_path,"/favicon.ico"},
>                               {1,1}}}
> ** When Server state == {st,acceptor,<0.42.0>,<0.53.0>,<0.53.0>,6,once,
>                            [{mode,binary},
>                             {packet,http},
>                             {ip,{0,0,0,0}},
>                             {active,once},
>                             {nodelay,false},
>                             {verify,0},
>                             {depth,1}],
>                            {sslsocket,6,<0.52.0>},
>                            #Port<0.688>,56916,open,true,false}
> ** Reason for termination ==
> ** {error,
>       {badinfo,
>           {http,#Port<0.688>,
>               {http_request,'GET',{abs_path,"/"},{1,1}}}}}



More information about the erlang-questions mailing list