I am using refit in my xamarin.forms project to connect to the server and download some data. The code below works properly if server is online but when server is offline, I got stuck and I am not getting response from the ConfigureAwait(false) function.
public async Task<bool> download()
{
var apiService = NetworkService.GetApiService();
try
{
var data = await apiService.getInitialData().ConfigureAwait(false);
insertData(fullPath, data);
return true;
}
catch (ValidationApiException e)
{
return false;
}
catch (ApiException e)
{
return false;
}
...