[erlang-questions] EPmail-0.1 released

Max Lapshin <>
Fri Jan 28 09:10:57 CET 2011

Really, this code:

accept(Socket) ->
    case gen_tcp:accept(Socket) of
	{ok, Sock} ->
	     spawn(?MODULE, receive_loop, [Sock, [], []]),
             gen_tcp:send(Sock, "+OK POP3 server ready \r\n"),
	{error, Reason} ->

isn't suitable for production. You should start all processes via
supervisors to keep track of them.
If you start just plain spawn/spawn_link, you risk to loose process
and get memory leak.

More information about the erlang-questions mailing list