nitrogen / simple_bridge

A simple, standardized interface library to Erlang HTTP Servers.
MIT License
112 stars 76 forks source link

mostly cowboy issues #52

Closed danikp closed 8 years ago

danikp commented 8 years ago
choptastic commented 8 years ago

Thanks. Ya know? I used to start cowboy the way you're doing here (https://github.com/nitrogen/simple_bridge/commit/eeb327c54e3f18f9966fffc8d74276acd2aaf8b7), but I wanted it running under supervision.

Given that I don't know why cowboy doesn't like being run under this supervision, and that this worked just fine before, I'll merge it in.

Also, thanks for fixing the IP thing, I didn't even realize I was binding all open IPs.

danikp commented 8 years ago

It took some time to understand why it drops error ... no match of right hand value {error,eaddrinuse} in ranch_acceptors_sup:init/1 l..., but I guess problem should be at startup and was right. Also, now it have same behavior as other webservers and I actually don't understand why you decided to make something different for cowboy.

choptastic commented 8 years ago

I did it like that for both cowboy and for webmachine ( https://github.com/nitrogen/simple_bridge/blob/master/src/webmachine_bridge_modules/webmachine_simple_bridge_sup.erl#L39-L45). The others all start from their own launch functions that don't mimic the start_link functionality, and I think long-term, my plan was to try to get everything under simple_bridge supervision, but I think I just got lazy and declared it "good enough for now".

-Jesse

On Wed, Sep 23, 2015 at 2:48 PM, Dmitry Polyanovsky < notifications@github.com> wrote:

It took some time to understand why it drops error ... no match of right hand value {error,eaddrinuse} in ranch_acceptors_sup:init/1 l..., but I guess problem should be at startup and was right. Also, now it have same behavior as other webservers and I actually don't understand why you decided to make something different for cowboy.

— Reply to this email directly or view it on GitHub https://github.com/nitrogen/simple_bridge/pull/52#issuecomment-142709046 .

Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm

danikp commented 8 years ago

ok, understood. I will wait until you decide to merge it (or fix the issue in other way), keeping in mind it's only thing preventing SB upgrade in CB