@@ -228,7 +228,7 @@ terminate(Reason, _State_Name,
228228% % @doc Activate if requested, from the 'INACTIVE' state.
229229? inactive (activate , # ef_state {connection_sup = Conn_Sup , config = Config } = State ) ->
230230 Max_Sessions = elysium_config :session_max_count (Config ),
231- _ = [elysium_connection_sup : start_child ( Conn_Sup , [Config ])
231+ _ = [spawn_monitor ( elysium_connection_sup , start_child , [ Conn_Sup , [Config ] ])
232232 || _N <- lists :seq (1 , Max_Sessions )],
233233 {next_state , ? active , State };
234234? inactive (_Other , # ef_state {} = State ) ->
@@ -300,5 +300,9 @@ handle_event(_Any, State_Name, #ef_state{} = State) ->
300300 State :: # ef_state {}.
301301% % @private
302302% % @doc Unused function.
303+ handle_info ({'DOWN' , _Ref , process , _Connection_Attempt , normal }, State_Name , # ef_state {} = State ) ->
304+ {next_state , State_Name , State };
305+ handle_info ({'DOWN' , _Ref , process , Connection_Attempt , Reason }, State_Name , # ef_state {} = State ) ->
306+ lager :warn (" Elysium connection in process ~p could not be established: ~p~n " , [Connection_Attempt , Reason ]);
303307handle_info (_Any , State_Name , # ef_state {} = State ) ->
304308 {next_state , State_Name , State }.
0 commit comments