gsup: Log connect failures

Change-Id: I273d37aa75cfacbc7c3302d035c2391d9bdd9b2e
changes/98/34198/4
Pau Espin 2023-08-24 17:52:52 +02:00 committed by laforge
parent 89ac8713e5
commit 1433617db7
1 changed files with 3 additions and 2 deletions

View File

@ -83,9 +83,10 @@ init([Address, Port, Options]) ->
true = ipa_proto:register_stream(Socket, ?IPAC_PROTO_EXT_GSUP, {process_id, self()}),
ipa_proto:unblock(Socket),
{ok, #gsupc_state{socket=Socket, ipa_pid=IpaPid}};
{error, econnrefused} ->
{error, Reason} ->
lager:error("Connecting to GSUP HLR on IP ~s port ~p failed: ~p~n", [Address, Port, Reason]),
timer:sleep(5000),
{stop, connrefused}
{stop, Reason}
end.