getaddrinfo() function blocks the code

Hello, 

I have an aplication that connects to a LTE network and sends periodically a post request with some information to a http server. To get IP server address, I use the getaddrinfo() function and before to execute this function, I use the lte_lc_conn_eval_params_get() function to get connection evaluation parameters. If energy efficiency are greater or equal than LTE_LC_ENERGY_CONSUMPTION_NORMAL, the code enters in getaddrinfo() function. Sometimes, this function blocks the code possibly because it no longer has a good signal connection.

How I can resolve this problem ?

Details setup:

Modem FW: mfw_nrf91x1_2.0.1

SDK: v2.6.1

Board: nRF9161 DK

BR,

GoncaloS

Related