diff --git a/lib/elixir/lib/gen_server.ex b/lib/elixir/lib/gen_server.ex index 24e112d7b91..eef21c34179 100644 --- a/lib/elixir/lib/gen_server.ex +++ b/lib/elixir/lib/gen_server.ex @@ -153,7 +153,7 @@ defmodule GenServer do detailed information. The `@doc` annotation immediately preceding `use GenServer` will be attached to the generated `child_spec/1` function. - When stopping the GenServer, for example by returing a `{:stop, reason, new_state}` + When stopping the GenServer, for example by returning a `{:stop, reason, new_state}` tuple from a callback, the exit reason is used by the supervisor to determine whether the GenServer needs to be restarted. See the "Exit reasons and restarts" section in the `Supervisor` module.