I guess my question is rather straight forward.
I am wondering if there is any point in using gen_tcp:close/1
on a socket owned by a process that is about to terminate. The connection is closed automatically and it returns {tcp_closed, Socket}
to the connected process on the other side, just like when close
is called, so I'm guessing the effect is the same and that close
is only needed when the connection has to be closed some time before termination.
Is this correct or are there any reasons why I should try to use close
on the socket even when the process is about to terminate?
Is there any difference for the listening socket or when the connected process on the other side is not an Erlang process?