[erlang-patches] R11B SSL patch

Oscar Hellström <>
Fri Jul 25 20:16:36 CEST 2008


I've noticed quite a few problems with the SSL driver exiting after 
printing "esock: Got connect request while PASSIVE". This is probably 
more easily triggered when the ssl:accept/2 is called with a timeout in 
a loop (since I suspect that it then sends the NOACCEPT command to the 
port quite often).

My suspicion is that if a connection attempt have been received, and 
polled from the listener socket, when the is an ESOCK_NOACCEPT_CMD 
waiting we'll end up receiving the connect event in 
ESOCK_PASSIVE_LISTENING further down in the loop. I don't quite 
understand why we need to exit whenever we poll a connection on a 
listener socket in ESOCK_PASSIVE_LISTENING state, but I guess it's 
because there shouldn't be an event there. To avoid this I've added a 
function to the esock_poll.c which can clear events for the fd in 
question. This should avoid the driver exiting with the "esock: Got 
connect request while PASSIVE" message and thus taking down all the SSL 

Please note that this has ONLY been tested with the poll interface and 
not even complied with select.

There has also been two emails describing this problem:
Oscar Hellström, 
Office: +44 20 7655 0337
Mobile: +44 798 45 44 773
Erlang Training and Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erlang-r11b-3.ssl.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20080725/62a49c22/attachment.bin>

More information about the erlang-patches mailing list