game: Handle errors correctly when failing to accept connections.

This commit is contained in:
Loïc Hoguin 2010-05-20 00:10:02 +02:00
parent 8415a2e03a
commit d603955e32

View File

@ -46,7 +46,7 @@ accept(LSocket) ->
egs_proto:send_hello(CSocket), egs_proto:send_hello(CSocket),
PID = spawn_link(?MODULE, process, [CSocket, 0]), PID = spawn_link(?MODULE, process, [CSocket, 0]),
ssl:controlling_process(CSocket, PID); ssl:controlling_process(CSocket, PID);
{error, timeout} -> _ ->
reload reload
end, end,
?MODULE:accept(LSocket). ?MODULE:accept(LSocket).