Re: gen_tcp:connect will close when using supervisor.
Roger Lipscombe <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CAJgnQd93vecPv9S_ZORE4hbji0-5tjFPPfP-uvMR0bDE5TiF5A@mail.gmail.com> |
On Tue, 24 Nov 2020 at 14:27, Jesper Louis Andersen <[email protected]> wrote: > The right way of solving this is to start using applications. An application has a top-level supervisor which is then handled by the application manager in the system, and thus not being shut down as long as the VM is running. It's a bit of a curve-ball I'm throwing you, I'm afraid. Applications are far more involved to set up I agree that applications are the way to go. I disagree that you need all of the extra release baggage, at least at the start. $ rebar3 new app my_app $ cd my_app (...create your gen_server and add it to my_app_sup...) $ rebar3 shell Done. You can look at how to do releases later.