Support custom lhttpc options & safer setup call #3

Open
wants to merge 2 commits into
from

Projects

None yet

3 participants

I wanted to use dinerl with the "regular" esl-lhttpc version, but ran into the problem that only ferd's fork supports the the {max_connections, n} option that was hardcoded in the request code of dinerl.

I suggest to offer a dinerl:setup/4 function that let's the user override the lhttpc options (I left the default options as is when using dinerl:setup/3). While working on the setup call, I also added some checks to make sure that setup only starts the periodic timer when the initial updata_data actually succeeds.

Please note: the clientarguments() returned by a successful call to setup will now contain an additional element with the lhttpc options. If changing the return signature is a problem for you, I can also make it match the original tuple.

Martin Rehfeld added some commits Aug 29, 2012
Martin Rehfeld allow setting custom lhttpc options with dinerl:setup/4
remove hardcoded lhttpc options from dynamodb module
d400071
Martin Rehfeld only start the periodic timer when update_data is successful
also make sure that dinerl:setup/4 only returns {ok, ...} when
when update_data and timer:apply_interval succeeded
05a6ea3
Contributor
dialtone commented Sep 6, 2012

I've merged the other one, I want a bit more time to figure this one out properly. Sorry for taking so long.

No worries. Let me know if you think something should be done differently...

eproxus commented Apr 16, 2014

Can this be merged so that Dinerl can be used with esl/lhttpc instead of ferd/lhttpc?

Contributor

Yeah, I'll try to do this in the next few days.

eproxus commented Apr 22, 2014

Awesome, thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment