<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><div></div><div>next_events?</div><div><br></div><div><br></div><div>On 15. Mar 2018, at 12:23, Peter Morgan <<a href="mailto:peter.james.morgan@gmail.com">peter.james.morgan@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div class="">** Reason for termination = error:{bad_action_from_state_function,<br class=""> {next_events,internal,initial_event}}<br class="">** Callback mode = handle_event_function<br class="">** Stacktrace =<br class="">** [{gen_statem,parse_actions_next_event,7,<br class=""> [{file,"gen_statem.erl"},{line,1299}]},<br class=""> {gen_statem,loop_event_actions_list,10,<br class=""> [{file,"gen_statem.erl"},{line,1194}]},<br class=""> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]<br class=""><br class=""></div><div class=""><br class=""></div><div class="">The docs seem to indicate that next_event remains valid on init/1 - <a href="http://erlang.org/doc/man/gen_statem.html#type-init_result" class="">http://erlang.org/doc/man/gen_statem.html#type-init_result</a>.</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Peter.</div><div class=""><br class=""></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></body></html>