[erlang-questions] gen_statem and returning {next_event, internal, astate} from init/1

Andrew Thompson andrew@REDACTED
Thu Oct 18 16:53:54 CEST 2018


On Thu, Oct 18, 2018 at 03:00:57PM +0200, bengt e wrote:
> Greetings,
> 
> Running tests on a gen_statem application they all fail. Directly after
> callback init/1. I see
> ** Reason for termination = error:{bad_action_from_state_function,
>                                       {next_events,internal,reconnect}}
> This is init, BTW:
> init() -> {ok, connect, #{}, {next_event, internal, reconnect}}.
> 

I believe this will work on OTP 21.1, it might be worth trying it there.

Andrew



More information about the erlang-questions mailing list