gen_tcp:connect will close when using supervisor.
Tue Nov 24 16:38:19 CET 2020
On Tue, 24 Nov 2020 at 14:27, Jesper Louis Andersen
> 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.
More information about the erlang-questions